Skip to content

Commit

Permalink
Merge pull request openzfs#38 from truenas/fix-zvol-open-locking
Browse files Browse the repository at this point in the history
FreeBSD: Fix zvol_geom_open locking
  • Loading branch information
Ryan Moeller authored Jan 25, 2022
2 parents c42146a + 84bba4e commit 53d3c4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/os/freebsd/zfs/zvol_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,8 @@ zvol_cdev_open(struct cdev *dev, int flags, int fmt, struct thread *td)
*/
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 {
Expand Down

0 comments on commit 53d3c4f

Please sign in to comment.