[Midnightbsd-cvs] src [8640] trunk/sys/kern/vfs_hash.c: rename vfs_hash_index to vfs_hash_bucket
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 25 14:18:02 EDT 2016
Revision: 8640
http://svnweb.midnightbsd.org/src/?rev=8640
Author: laffer1
Date: 2016-09-25 14:18:02 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
rename vfs_hash_index to vfs_hash_bucket
Modified Paths:
--------------
trunk/sys/kern/vfs_hash.c
Modified: trunk/sys/kern/vfs_hash.c
===================================================================
--- trunk/sys/kern/vfs_hash.c 2016-09-25 18:17:36 UTC (rev 8639)
+++ trunk/sys/kern/vfs_hash.c 2016-09-25 18:18:02 UTC (rev 8640)
@@ -55,10 +55,10 @@
SYSINIT(vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL);
static struct vfs_hash_head *
-vfs_hash_index(const struct mount *mp, u_int hash)
+vfs_hash_bucket(const struct mount *mp, u_int hash)
{
- return(&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]);
+ return (&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]);
}
int
@@ -69,7 +69,7 @@
while (1) {
mtx_lock(&vfs_hash_mtx);
- LIST_FOREACH(vp, vfs_hash_index(mp, hash), v_hashlist) {
+ LIST_FOREACH(vp, vfs_hash_bucket(mp, hash), v_hashlist) {
if (vp->v_hash != hash)
continue;
if (vp->v_mount != mp)
@@ -113,7 +113,7 @@
while (1) {
mtx_lock(&vfs_hash_mtx);
LIST_FOREACH(vp2,
- vfs_hash_index(vp->v_mount, hash), v_hashlist) {
+ vfs_hash_bucket(vp->v_mount, hash), v_hashlist) {
if (vp2->v_hash != hash)
continue;
if (vp2->v_mount != vp->v_mount)
@@ -138,7 +138,7 @@
}
vp->v_hash = hash;
- LIST_INSERT_HEAD(vfs_hash_index(vp->v_mount, hash), vp, v_hashlist);
+ LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist);
mtx_unlock(&vfs_hash_mtx);
return (0);
}
@@ -149,7 +149,7 @@
mtx_lock(&vfs_hash_mtx);
LIST_REMOVE(vp, v_hashlist);
- LIST_INSERT_HEAD(vfs_hash_index(vp->v_mount, hash), vp, v_hashlist);
+ LIST_INSERT_HEAD(vfs_hash_bucket(vp->v_mount, hash), vp, v_hashlist);
vp->v_hash = hash;
mtx_unlock(&vfs_hash_mtx);
}
More information about the Midnightbsd-cvs
mailing list