For vunref(), try to upgrade the vnode lock if the function was called
with the vnode shared-locked. If upgrade succeeded, the inactivation can be done immediately, instead of being postponed. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (glebius)
This commit is contained in:
parent
ac34145005
commit
fe39412e99
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user