Commit 84ed82b7 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

rhashtable: Add annotation to nested lock

Commit aa34a6cb ("rhashtable:
Add arbitrary rehash function") killed the annotation on the
nested lock which leads to bitching from lockdep.
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d77c555d
...@@ -234,7 +234,7 @@ static int rhashtable_rehash_one(struct rhashtable *ht, unsigned old_hash) ...@@ -234,7 +234,7 @@ static int rhashtable_rehash_one(struct rhashtable *ht, unsigned old_hash)
new_bucket_lock = bucket_lock(new_tbl, new_hash); new_bucket_lock = bucket_lock(new_tbl, new_hash);
spin_lock(new_bucket_lock); spin_lock_nested(new_bucket_lock, RHT_LOCK_NESTED);
head = rht_dereference_bucket(new_tbl->buckets[new_hash], head = rht_dereference_bucket(new_tbl->buckets[new_hash],
new_tbl, new_hash); new_tbl, new_hash);
...@@ -415,7 +415,7 @@ static bool __rhashtable_insert(struct rhashtable *ht, struct rhash_head *obj, ...@@ -415,7 +415,7 @@ static bool __rhashtable_insert(struct rhashtable *ht, struct rhash_head *obj,
tbl = rht_dereference_rcu(ht->future_tbl, ht); tbl = rht_dereference_rcu(ht->future_tbl, ht);
if (tbl != old_tbl) { if (tbl != old_tbl) {
hash = obj_raw_hashfn(ht, tbl, rht_obj(ht, obj)); hash = obj_raw_hashfn(ht, tbl, rht_obj(ht, obj));
spin_lock(bucket_lock(tbl, hash)); spin_lock_nested(bucket_lock(tbl, hash), RHT_LOCK_NESTED);
} }
if (compare && if (compare &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment