diff options
author | avg <avg@FreeBSD.org> | 2016-12-14 16:10:58 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2016-12-14 16:10:58 +0000 |
commit | c9cb255d7a73f32a8da1724b0121146455a4b9a5 (patch) | |
tree | 6fb191fea2453d882814108a2e877d7b8b03d433 /cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c | |
parent | ff5a221570524dab5c353974ce6afbb5c1b06b12 (diff) | |
download | FreeBSD-src-c9cb255d7a73f32a8da1724b0121146455a4b9a5.zip FreeBSD-src-c9cb255d7a73f32a8da1724b0121146455a4b9a5.tar.gz |
MFC r308985: revert r304520, set canmount=on is not supposed to mount
the filesystem
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c | 11 |
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 8e69f3c..576e894 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c @@ -1615,17 +1615,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; |