svn commit: r358380 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Thu Feb 27 14:12:44 UTC 2020
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,
More information about the svn-src-head
mailing list