mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
OpenZFS 6428 - set canmount=off on unmounted filesystem tries to unmount children
Authored by: Andriy Gapon <andriy.gapon@clusterhq.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/6428 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c079fa4 Closes #5628
This commit is contained in:
parent
ec923db25c
commit
b87baa7ed2
@ -1628,8 +1628,9 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
|||||||
* its canmount property to 'on' or 'noauto'. We only use
|
* its canmount property to 'on' or 'noauto'. We only use
|
||||||
* the changelist logic to unmount when setting canmount=off.
|
* the changelist logic to unmount when setting canmount=off.
|
||||||
*/
|
*/
|
||||||
if (!(prop == ZFS_PROP_CANMOUNT &&
|
if (prop != ZFS_PROP_CANMOUNT ||
|
||||||
fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) {
|
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
|
||||||
|
zfs_is_mounted(zhp, NULL))) {
|
||||||
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
|
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
|
||||||
if (cls[cl_idx] == NULL)
|
if (cls[cl_idx] == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user