summaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-03-12 14:47:13 +1100
committerDavid S. Miller <davem@davemloft.net>2015-03-11 23:53:40 -0400
commit84ed82b74dcb23d96cee2987612a677ffd2b5470 (patch)
treea0ba6ab14a337c5d3a22c8ac451b8265f1de1348 /lib/rhashtable.c
parentd77c555d325d6ece7d352995c97460988c152f58 (diff)
downloadblackbird-op-linux-84ed82b74dcb23d96cee2987612a677ffd2b5470.tar.gz
blackbird-op-linux-84ed82b74dcb23d96cee2987612a677ffd2b5470.zip
rhashtable: Add annotation to nested lock
Commit aa34a6cb0478842452bac58edb50d3ef9e178c92 ("rhashtable: Add arbitrary rehash function") killed the annotation on the nested lock which leads to bitching from lockdep. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index b1c19c5fb326..d7f3db57b5d0 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -234,7 +234,7 @@ static int rhashtable_rehash_one(struct rhashtable *ht, unsigned old_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],
new_tbl, new_hash);
@@ -415,7 +415,7 @@ static bool __rhashtable_insert(struct rhashtable *ht, struct rhash_head *obj,
tbl = rht_dereference_rcu(ht->future_tbl, ht);
if (tbl != old_tbl) {
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 &&
OpenPOWER on IntegriCloud