aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2017-09-19 06:41:37 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-19 18:18:33 -0400
commit0647169cf9aa441700eb8f23ea49be060626534b (patch)
tree427c655a15c9ec37f63a5f568fea63a331548dd3 /lib/rhashtable.c
parent6073512cc8e2c48bed5c6625c02c5e4ae50cec34 (diff)
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: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 707ca5d677c6..ddd7dde87c3c 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -735,9 +735,9 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
735 * rhashtable_walk_start - Start a hash table walk 735 * rhashtable_walk_start - Start a hash table walk
736 * @iter: Hash table iterator 736 * @iter: Hash table iterator
737 * 737 *
738 * Start a hash table walk. Note that we take the RCU lock in all 738 * Start a hash table walk at the current iterator position. Note that we take
739 * cases including when we return an error. So you must always call 739 * the RCU lock in all cases including when we return an error. So you must
740 * rhashtable_walk_stop to clean up. 740 * always call rhashtable_walk_stop to clean up.
741 * 741 *
742 * Returns zero if successful. 742 * Returns zero if successful.
743 * 743 *
@@ -846,7 +846,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
846 * rhashtable_walk_stop - Finish a hash table walk 846 * rhashtable_walk_stop - Finish a hash table walk
847 * @iter: Hash table iterator 847 * @iter: Hash table iterator
848 * 848 *
849 * Finish a hash table walk. 849 * Finish a hash table walk. Does not reset the iterator to the start of the
850 * hash table.
850 */ 851 */
851void rhashtable_walk_stop(struct rhashtable_iter *iter) 852void rhashtable_walk_stop(struct rhashtable_iter *iter)
852 __releases(RCU) 853 __releases(RCU)