aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorBoris Popov <bp@FreeBSD.org>2000-10-03 04:25:53 +0000
committerBoris Popov <bp@FreeBSD.org>2000-10-03 04:25:53 +0000
commit611025ec57f8f081168e7302b193b0074d2cd4ea (patch)
treeb17cd5f4aed8de0f1d16f4175269ccb95944f6ee /sys/fs
parent2bcf21c0ccb3148be7cb4e798c70490de0144050 (diff)
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nullfs/null_vnops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 0b7cb9664206..9c15f9d7812c 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -622,6 +622,8 @@ null_lock(ap)
* towards decomissioning it.
*/
lvp = NULLVPTOLOWERVP(vp);
+ if (lvp == NULL)
+ return (lockmgr(&vp->v_lock, flags, &vp->v_interlock, p));
if (flags & LK_INTERLOCK) {
simple_unlock(&vp->v_interlock);
flags &= ~LK_INTERLOCK;
@@ -656,6 +658,7 @@ null_unlock(ap)
struct vnode *vp = ap->a_vp;
int flags = ap->a_flags;
struct proc *p = ap->a_p;
+ struct vnode *lvp;
if (vp->v_vnlock != NULL) {
if (flags & LK_THISLAYER)
@@ -664,10 +667,13 @@ null_unlock(ap)
return (lockmgr(vp->v_vnlock, flags | LK_RELEASE,
&vp->v_interlock, p));
}
+ lvp = NULLVPTOLOWERVP(vp);
+ if (lvp == NULL)
+ return (lockmgr(&vp->v_lock, flags | LK_RELEASE, &vp->v_interlock, p));
if ((flags & LK_THISLAYER) == 0) {
if (flags & LK_INTERLOCK)
simple_unlock(&vp->v_interlock);
- VOP_UNLOCK(NULLVPTOLOWERVP(vp), flags & ~LK_INTERLOCK, p);
+ VOP_UNLOCK(lvp, flags & ~LK_INTERLOCK, p);
} else
flags &= ~LK_THISLAYER;
return (lockmgr(&vp->v_lock, flags | LK_RELEASE, &vp->v_interlock, p));