Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2020 14:12:43 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358380 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <202002271412.01REChVC042440@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Feb 27 14:12:43 2020
New Revision: 358380
URL: https://svnweb.freebsd.org/changeset/base/358380

Log:
  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.
  
  MFC after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Thu Feb 27 13:12:14 2020	(r358379)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c	Thu Feb 27 14:12:43 2020	(r358380)
@@ -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?202002271412.01REChVC042440>