The documentation claims that when rhashtable_walk_start_check() detects a resize event, it will rewind back to the beginning of the table. This is not true. We need to set ->slot and ->skip to be zero for it to be true.
Acked-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: NeilBrown <ne...@suse.com> --- lib/rhashtable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 19db8e563c40..28e1be9f681b 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -733,6 +733,8 @@ int rhashtable_walk_start_check(struct rhashtable_iter *iter) if (!iter->walker.tbl && !iter->end_of_table) { iter->walker.tbl = rht_dereference_rcu(ht->tbl, ht); + iter->slot = 0; + iter->skip = 0; return -EAGAIN; }