mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-03 19:55:31 +00:00
rhashtable: reset iter when rhashtable_walk_start sees new table
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 <herbert@gondor.apana.org.au> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
82266e98dd
commit
b41cc04b66
@ -737,6 +737,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user