diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2016-11-22 11:44:30 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2016-11-22 11:44:30 +0000 |
commit | 9170c18bb923078bf8ba9eb82831105893cc9e5e (patch) | |
tree | 50ca5e17ef1bd47ac1a56c71e0cad7c3e92f004d /cddl/contrib | |
parent | 753a007f0d7398f6066cb686483b148f36b540c3 (diff) | |
download | src-9170c18bb923078bf8ba9eb82831105893cc9e5e.tar.gz src-9170c18bb923078bf8ba9eb82831105893cc9e5e.zip |
revert r304520, set canmount=on is not supposed to mount the filesystem
Not sure where I got the idea that it should.
See https://github.com/openzfs/openzfs/pull/218
Reported by: mahrens
Pointyhat to: avg
MFC after: 5 days
Notes
Notes:
svn path=/head/; revision=308985
Diffstat (limited to 'cddl/contrib')
-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 41f934b54b88..1cb5f9310f57 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; |