summaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 057919164e23..71fd0dd45ce3 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -94,13 +94,7 @@ static u32 obj_raw_hashfn(const struct rhashtable *ht, const void *ptr)
static u32 key_hashfn(struct rhashtable *ht, const void *key, u32 len)
{
- struct bucket_table *tbl = rht_dereference_rcu(ht->tbl, ht);
- u32 hash;
-
- hash = ht->p.hashfn(key, len, ht->p.hash_rnd);
- hash >>= HASH_RESERVED_SPACE;
-
- return rht_bucket_index(tbl, hash);
+ return ht->p.hashfn(key, len, ht->p.hash_rnd) >> HASH_RESERVED_SPACE;
}
static u32 head_hashfn(const struct rhashtable *ht,