diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-09-27 09:37:17 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-09-27 09:37:17 +0000 |
commit | f01126fae0382ad656a4cdc3a0ff931e61ee6856 (patch) | |
tree | 79f0ebd3010d2f29f93cd03239150c75b3965c42 /sys/kern/vfs_subr.c | |
parent | fe8ac3dea41f55a49834900a78cc1c7a217259da (diff) |
Minimal optimization.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4ea481d6c88..77a473fd5be 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.46 2000/07/17 14:54:26 art Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.47 2000/09/27 09:37:16 art Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -660,8 +660,10 @@ vget(vp, flags, p) * return failure. Cleaning is determined by checking that * the VXLOCK flag is set. */ - if ((flags & LK_INTERLOCK) == 0) + if ((flags & LK_INTERLOCK) == 0) { simple_lock(&vp->v_interlock); + flags |= LK_INTERLOCK; + } if (vp->v_flag & VXLOCK) { vp->v_flag |= VXWANT; simple_unlock(&vp->v_interlock); @@ -679,7 +681,7 @@ vget(vp, flags, p) } vp->v_usecount++; if (flags & LK_TYPE_MASK) { - if ((error = vn_lock(vp, flags | LK_INTERLOCK, p)) != 0) { + if ((error = vn_lock(vp, flags, p)) != 0) { vp->v_usecount--; if (vp->v_usecount == 0) vputonfreelist(vp); |