]> git.baikalelectronics.ru Git - kernel.git/commit
rhashtable: Introduce rhashtable_walk_*
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 3 Feb 2015 20:33:23 +0000 (07:33 +1100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Feb 2015 04:34:52 +0000 (20:34 -0800)
commit9ae10cdf92163ca5ce34c6a70ea41574018564be
tree797f3efa15dea4dae84d08800b407d0748ff34d7
parent6ef0ff6190da5956de73f44a488f6135699a0f44
rhashtable: Introduce rhashtable_walk_*

Some existing rhashtable users get too intimate with it by walking
the buckets directly.  This prevents us from easily changing the
internals of rhashtable.

This patch adds the helpers rhashtable_walk_init/exit/start/next/stop
which will replace these custom walkers.

They are meant to be usable for both procfs seq_file walks as well
as walking by a netlink dump.  The iterator structure should fit
inside a netlink dump cb structure, with at least one element to
spare.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/rhashtable.h
lib/rhashtable.c