aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-03-16 05:42:27 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-16 16:24:13 -0400
commitdb4374f48a6c31c02f6ad1d19b257c186b443c0c (patch)
tree5beff1d733980c3458741777e4513682d6cd3674 /lib/rhashtable.c
parent04f49faf70d4c056cd6576ff0614bb54e7a70bbc (diff)
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 <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c2
1 files changed, 2 insertions, 0 deletions
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);
760 * by calling rhashtable_walk_next. 760 * by calling rhashtable_walk_next.
761 */ 761 */
762int rhashtable_walk_start(struct rhashtable_iter *iter) 762int rhashtable_walk_start(struct rhashtable_iter *iter)
763 __acquires(RCU)
763{ 764{
764 struct rhashtable *ht = iter->ht; 765 struct rhashtable *ht = iter->ht;
765 766
@@ -847,6 +848,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
847 * Finish a hash table walk. 848 * Finish a hash table walk.
848 */ 849 */
849void rhashtable_walk_stop(struct rhashtable_iter *iter) 850void rhashtable_walk_stop(struct rhashtable_iter *iter)
851 __releases(RCU)
850{ 852{
851 struct rhashtable *ht; 853 struct rhashtable *ht;
852 struct bucket_table *tbl = iter->walker->tbl; 854 struct bucket_table *tbl = iter->walker->tbl;