Commit 82266e98 authored by NeilBrown's avatar NeilBrown Committed by David S. Miller

rhashtable: Revise incorrect comment on r{hl, hash}table_walk_enter()

Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, though
they do take a spinlock without irq protection.
So revise the comments to accurately state the contexts in which
these functions can be called.
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c6f69a5
...@@ -1268,8 +1268,9 @@ static inline int rhashtable_walk_init(struct rhashtable *ht, ...@@ -1268,8 +1268,9 @@ static inline int rhashtable_walk_init(struct rhashtable *ht,
* For a completely stable walk you should construct your own data * For a completely stable walk you should construct your own data
* structure outside the hash table. * structure outside the hash table.
* *
* This function may sleep so you must not call it from interrupt * This function may be called from any process context, including
* context or with spin locks held. * non-preemptable context, but cannot be called from softirq or
* hardirq context.
* *
* You must call rhashtable_walk_exit after this function returns. * You must call rhashtable_walk_exit after this function returns.
*/ */
......
...@@ -668,8 +668,9 @@ EXPORT_SYMBOL_GPL(rhashtable_insert_slow); ...@@ -668,8 +668,9 @@ EXPORT_SYMBOL_GPL(rhashtable_insert_slow);
* For a completely stable walk you should construct your own data * For a completely stable walk you should construct your own data
* structure outside the hash table. * structure outside the hash table.
* *
* This function may sleep so you must not call it from interrupt * This function may be called from any process context, including
* context or with spin locks held. * non-preemptable context, but cannot be called from softirq or
* hardirq context.
* *
* You must call rhashtable_walk_exit after this function returns. * You must call rhashtable_walk_exit after this function returns.
*/ */
......
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