summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_subr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 23343f1..952a489 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2218,8 +2218,10 @@ vputx(struct vnode *vp, int func)
}
break;
case VPUTX_VUNREF:
- if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE)
- error = EBUSY;
+ if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) {
+ error = VOP_LOCK(vp, LK_TRYUPGRADE | LK_INTERLOCK);
+ VI_LOCK(vp);
+ }
break;
}
if (vp->v_usecount > 0)
OpenPOWER on IntegriCloud