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,
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to