- Only the xlock holder should be calling VOP_LOCK on a vp once VI_XLOCK
has been set. Assert that this is the case so that we catch filesystems who are using naked VOP_LOCKs in illegal cases. Sponsored by: Isilon Systems, Inc.
This commit is contained in:
parent
4c11620bb9
commit
d8a7c99a1c
@ -3511,6 +3511,11 @@ vop_lock_pre(void *ap)
|
||||
{
|
||||
struct vop_lock_args *a = ap;
|
||||
|
||||
if (a->a_vp->v_iflag & VI_XLOCK &&
|
||||
a->a_vp->v_vxthread != curthread) {
|
||||
vprint("vop_lock_pre:", a->a_vp);
|
||||
panic("vop_lock_pre: locked while xlock held.\n");
|
||||
}
|
||||
if ((a->a_flags & LK_INTERLOCK) == 0)
|
||||
ASSERT_VI_UNLOCKED(a->a_vp, "VOP_LOCK");
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user