Commit 0647169c authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by David S. Miller

rhashtable: Documentation tweak

Clarify that rhashtable_walk_{stop,start} will not reset the iterator to
the beginning of the hash table.  Confusion between rhashtable_walk_enter
and rhashtable_walk_start has already lead to a bug.
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6073512c
...@@ -735,9 +735,9 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit); ...@@ -735,9 +735,9 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
* rhashtable_walk_start - Start a hash table walk * rhashtable_walk_start - Start a hash table walk
* @iter: Hash table iterator * @iter: Hash table iterator
* *
* Start a hash table walk. Note that we take the RCU lock in all * Start a hash table walk at the current iterator position. Note that we take
* cases including when we return an error. So you must always call * the RCU lock in all cases including when we return an error. So you must
* rhashtable_walk_stop to clean up. * always call rhashtable_walk_stop to clean up.
* *
* Returns zero if successful. * Returns zero if successful.
* *
...@@ -846,7 +846,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next); ...@@ -846,7 +846,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
* rhashtable_walk_stop - Finish a hash table walk * rhashtable_walk_stop - Finish a hash table walk
* @iter: Hash table iterator * @iter: Hash table iterator
* *
* Finish a hash table walk. * Finish a hash table walk. Does not reset the iterator to the start of the
* hash table.
*/ */
void rhashtable_walk_stop(struct rhashtable_iter *iter) void rhashtable_walk_stop(struct rhashtable_iter *iter)
__releases(RCU) __releases(RCU)
......
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