diff options
Diffstat (limited to 'sys/ufs/ffs/ffs_softdep.c')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 52895599c62..99abc3cc76c 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.149 2020/03/09 16:49:12 millert Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.150 2021/04/28 09:53:53 claudio Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -4563,8 +4563,12 @@ softdep_fsync(struct vnode *vp) * not now, but then the user was not asking to have it * written, so we are not breaking any promises. */ - if (vp->v_flag & VXLOCK) + mtx_enter(&vnode_mtx); + if (vp->v_lflag & VXLOCK) { + mtx_leave(&vnode_mtx); break; + } + mtx_leave(&vnode_mtx); /* * We prevent deadlock by always fetching inodes from the * root, moving down the directory tree. Thus, when fetching |