Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2020 11:41:08 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r361365 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <202005221141.04MBf8nY017918@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri May 22 11:41:08 2020
New Revision: 361365
URL: https://svnweb.freebsd.org/changeset/base/361365

Log:
  MFC r358380,r358382: dsl_dataset_promote_sync: populate 'oldname' before using it
  
  It's very unlikely that zfsvfs_update_fromname() and
  zvol_rename_minors() ever did anything during the promote operation as
  the old name was not initialized.

Modified:
  stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Fri May 22 11:25:45 2020	(r361364)
+++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Fri May 22 11:41:08 2020	(r361365)
@@ -3109,6 +3109,10 @@ dsl_dataset_promote_sync(void *arg, dmu_tx_t *tx)
 			ds->ds_objset = NULL;
 		}
 
+#if defined(__FreeBSD__) && defined(_KERNEL)
+		dsl_dataset_name(ds, oldname);
+#endif
+
 		/* move snap name entry */
 		VERIFY0(dsl_dataset_get_snapname(ds));
 		VERIFY0(dsl_dataset_snap_remove(origin_head,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005221141.04MBf8nY017918>