From: Thomas Graf Date: Mon, 16 Mar 2015 09:42:27 +0000 (+0100) Subject: rhashtable: Annotate RCU locking of walkers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=db4374f48a6c31c02f6ad1d19b257c186b443c0c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git rhashtable: Annotate RCU locking of walkers Fixes the following sparse warnings: lib/rhashtable.c:767:5: warning: context imbalance in 'rhashtable_walk_start' - wrong count at exit lib/rhashtable.c:849:6: warning: context imbalance in 'rhashtable_walk_stop' - unexpected unlock Fixes: f2dba9c6ff0d ("rhashtable: Introduce rhashtable_walk_*") Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/lib/rhashtable.c b/lib/rhashtable.c index c523d3a563aa..eae26a67bd18 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -760,6 +760,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit); * by calling rhashtable_walk_next. */ int rhashtable_walk_start(struct rhashtable_iter *iter) + __acquires(RCU) { struct rhashtable *ht = iter->ht; @@ -847,6 +848,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next); * Finish a hash table walk. */ void rhashtable_walk_stop(struct rhashtable_iter *iter) + __releases(RCU) { struct rhashtable *ht; struct bucket_table *tbl = iter->walker->tbl;