mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
fix zfs set canmount=off on an unmounted filesystem
Previously this operation tried to unmount and remount children. Also see https://www.illumos.org/issues/6428. MFC after: 2 weeks X-Needs-Upstreaming: illumos
This commit is contained in:
parent
34082fa0f8
commit
329e9bafe4
1 changed files with 3 additions and 2 deletions
|
|
@ -1633,8 +1633,9 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
|||
* 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)) {
|
||||
if (prop != ZFS_PROP_CANMOUNT ||
|
||||
(fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF &&
|
||||
zfs_is_mounted(zhp, NULL))) {
|
||||
cls[cl_idx] = changelist_gather(zhp, prop, 0, 0);
|
||||
if (cls[cl_idx] == NULL)
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Reference in a new issue