summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_hash.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-15 08:07:07 +0000
committerphk <phk@FreeBSD.org>2005-03-15 08:07:07 +0000
commit124bf5e823dfe2ddde94c57660a3beffc2f99b57 (patch)
tree222a537cdd030d8083d8dae9e650ae3be7de0573 /sys/kern/vfs_hash.c
parenta7b3bd456408d157545ff8c8ffd7060ae2070886 (diff)
downloadFreeBSD-src-124bf5e823dfe2ddde94c57660a3beffc2f99b57.zip
FreeBSD-src-124bf5e823dfe2ddde94c57660a3beffc2f99b57.tar.gz
Simplify the vfs_hash calling convention.
Diffstat (limited to 'sys/kern/vfs_hash.c')
-rw-r--r--sys/kern/vfs_hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_hash.c b/sys/kern/vfs_hash.c
index 43d945e..5b77b1f 100644
--- a/sys/kern/vfs_hash.c
+++ b/sys/kern/vfs_hash.c
@@ -102,6 +102,8 @@ vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, stru
struct vnode *vp2;
int error;
+ lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, td);
+ *vpp = NULL;
while (1) {
mtx_lock(&vfs_hash_mtx);
LIST_FOREACH(vp2,
@@ -132,7 +134,6 @@ vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, stru
vp->v_iflag |= VI_HASHED;
VI_UNLOCK(vp);
mtx_unlock(&vfs_hash_mtx);
- *vpp = NULL;
return (0);
}
OpenPOWER on IntegriCloud