summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2016-12-14 16:11:19 +0000
committeravg <avg@FreeBSD.org>2016-12-14 16:11:19 +0000
commit44078954ec08c7884c55a193e686e5f9b83d4e5a (patch)
treefb8dc55d1fdf80c61891b118cc22f4bd8da50b44
parent6872d82f708dc9afa568571cbc2ac7ba0b4564c2 (diff)
downloadFreeBSD-src-44078954ec08c7884c55a193e686e5f9b83d4e5a.zip
FreeBSD-src-44078954ec08c7884c55a193e686e5f9b83d4e5a.tar.gz
MFC r308985: revert r304520, set canmount=on is not supposed to mount
the filesystem
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
index 7b86be2..9381eaa 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
@@ -1609,17 +1609,12 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
assert(cl_idx < nvl_len);
/*
* We don't want to unmount & remount the dataset when changing
- * its canmount property. We only use the changelist logic to
- * unmount when setting canmount=off for a mounted filesystem
- * or when setting canmount=on for an unmounted filesystem.
- * For all other changes to canmount property the filesystem
- * remains the same.
+ * its canmount property to 'on' or 'noauto'. We only use
+ * the changelist logic to unmount when setting canmount=off.
*/
if (prop != ZFS_PROP_CANMOUNT ||
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
- zfs_is_mounted(zhp, NULL)) ||
- (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_ON &&
- !zfs_is_mounted(zhp, NULL))) {
+ zfs_is_mounted(zhp, NULL))) {
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
if (cls[cl_idx] == NULL)
goto error;
OpenPOWER on IntegriCloud