Commit db4374f4 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

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: f2dba9c6 ("rhashtable: Introduce rhashtable_walk_*")
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04f49faf
...@@ -760,6 +760,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit); ...@@ -760,6 +760,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
* by calling rhashtable_walk_next. * by calling rhashtable_walk_next.
*/ */
int rhashtable_walk_start(struct rhashtable_iter *iter) int rhashtable_walk_start(struct rhashtable_iter *iter)
__acquires(RCU)
{ {
struct rhashtable *ht = iter->ht; struct rhashtable *ht = iter->ht;
...@@ -847,6 +848,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next); ...@@ -847,6 +848,7 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
* Finish a hash table walk. * Finish a hash table walk.
*/ */
void rhashtable_walk_stop(struct rhashtable_iter *iter) void rhashtable_walk_stop(struct rhashtable_iter *iter)
__releases(RCU)
{ {
struct rhashtable *ht; struct rhashtable *ht;
struct bucket_table *tbl = iter->walker->tbl; struct bucket_table *tbl = iter->walker->tbl;
......
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