diff options
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 9a4ed2b..09dcf58 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -279,13 +279,15 @@ vn_writechk(vp) register struct vnode *vp; { + ASSERT_VOP_LOCKED(vp, "vn_writechk"); /* * If there's shared text associated with * the vnode, try to free it up once. If * we fail, we can't allow writing. */ - if (vp->v_flag & VTEXT) + if (vp->v_vflag & VV_TEXT) return (ETXTBSY); + return (0); } @@ -818,10 +820,10 @@ debug_vn_lock(vp, flags, td, filename, line) do { if ((flags & LK_INTERLOCK) == 0) - mtx_lock(&vp->v_interlock); - if ((vp->v_flag & VXLOCK) && vp->v_vxproc != curthread) { - vp->v_flag |= VXWANT; - msleep(vp, &vp->v_interlock, PINOD | PDROP, + VI_LOCK(vp); + if ((vp->v_iflag & VI_XLOCK) && vp->v_vxproc != curthread) { + vp->v_iflag |= VI_XWANT; + msleep(vp, VI_MTX(vp), PINOD | PDROP, "vn_lock", 0); error = ENOENT; } else { |