summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-08-22 07:44:45 +0000
committerjeff <jeff@FreeBSD.org>2002-08-22 07:44:45 +0000
commit6c5497f47a5a81903384421e5b55e10c76905d75 (patch)
tree411a5434a85b431b5c0bd93d908225f8527b52d7 /sys/kern/vfs_vnops.c
parent120149c075e60c80ddba7f60e2a0d4b9eb1e3ce4 (diff)
downloadFreeBSD-src-6c5497f47a5a81903384421e5b55e10c76905d75.zip
FreeBSD-src-6c5497f47a5a81903384421e5b55e10c76905d75.tar.gz
- Make vn_lock() vget() and VOP_LOCK() all behave the same way WRT
LK_INTERLOCK. The interlock will never be held on return from these functions even when there is an error. Errors typically only occur when the XLOCK is held which means this isn't the vnode we want anyway. Almost all users of these interfaces expected this behavior even though it was not provided before.
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 5be404b..43683e0 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -853,10 +853,9 @@ debug_vn_lock(vp, flags, td, filename, line)
msleep(vp, VI_MTX(vp), PINOD | PDROP,
"vn_lock", 0);
/*
- * Since we're just going to return, unlock interlock
- * if the caller didn't call us with it held.
+ * Since we're just going to return, unlock interlock.
*/
- if ((flags & (LK_INTERLOCK|LK_RETRY)) == 0)
+ if ((flags & LK_RETRY) == 0)
VI_UNLOCK(vp);
error = ENOENT;
} else {
OpenPOWER on IntegriCloud