rhashtable: Remove GFP flag from rhashtable_walk_init
commit246779dd090bd1b74d2652b3a6ca7759f593b27a
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Aug 2016 08:50:56 +0000 (18 16:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 21:40:24 +0000 (19 14:40 -0700)
tree63526206a69c1ec56bc8490839504095ab0428f9
parent363dc396a5030ca82aa3e1a55b7d72965f968849
rhashtable: Remove GFP flag from rhashtable_walk_init

The commit 8f6fd83c6c5ec66a4a70c728535ddcdfef4f3697 ("rhashtable:
accept GFP flags in rhashtable_walk_init") added a GFP flag argument
to rhashtable_walk_init because some users wish to use the walker
in an unsleepable context.

In fact we don't need to allocate memory in rhashtable_walk_init
at all.  The walker is always paired with an iterator so we could
just stash ourselves there.

This patch does that by introducing a new enter function to replace
the existing init function.  This way we don't have to churn all
the existing users again.

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