diff options
author | Ryan Moeller <[email protected]> | 2022-01-26 14:23:39 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-26 11:23:39 -0800 |
commit | 3158c2e3cba16bdc8b830d8b1f181bcf1e6783d2 (patch) | |
tree | 26e84d71545617fd9827f13b0208e9daa57b2b5a /module | |
parent | 8d6a598a20df384a51a568f3c76241294d1326e6 (diff) |
FreeBSD: Fix zvol_cdev_open locking
First open locking changes were correctly applied to zvol_geom_open but
incorrectly applied to zvol_cdev_open, causing spa_namespace_lock to be
held indefinitely.
Make the first open locking in zvol_cdev_open match zvol_geom_open.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #13016
Diffstat (limited to 'module')
-rw-r--r-- | module/os/freebsd/zfs/zvol_os.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/os/freebsd/zfs/zvol_os.c b/module/os/freebsd/zfs/zvol_os.c index 8785557cb..06dd8cfdd 100644 --- a/module/os/freebsd/zfs/zvol_os.c +++ b/module/os/freebsd/zfs/zvol_os.c @@ -928,8 +928,8 @@ retry: */ if (!mutex_owned(&spa_namespace_lock)) { if (!mutex_tryenter(&spa_namespace_lock)) { - rw_exit(&zvol_state_lock); - mutex_enter(&spa_namespace_lock); + mutex_exit(&zv->zv_state_lock); + rw_exit(&zv->zv_suspend_lock); kern_yield(PRI_USER); goto retry; } else { |