diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2002-08-04 10:29:36 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2002-08-04 10:29:36 +0000 |
| commit | e6e370a7fe930e04cec38bcc2e06be127ed7ee02 (patch) | |
| tree | e889f56910bf98cbee3be239655a9e4bbb928b2e /sys/kern/vfs_vnops.c | |
| parent | f75bb0aa25847511ed461bccb4d3fc247ab6b1d5 (diff) | |
Notes
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 9a4ed2b1db64..09dcf58836e8 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 { |
