summaryrefslogtreecommitdiffstats
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2018-08-22 07:01:45 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-22 19:52:52 +0200
commit93f976b5190df32793908d49165f78e67fcb66cf (patch)
tree1ea0ab13c02e21d479ecdc2118f27769cd9cbd5d /lib/assoc_array.c
parentipc: drop ipc_lock() (diff)
downloadlinux-93f976b5190df32793908d49165f78e67fcb66cf.tar.xz
linux-93f976b5190df32793908d49165f78e67fcb66cf.zip
lib/rhashtable: simplify bucket_table_alloc()
As of ce91f6ee5b3b ("mm: kvmalloc does not fallback to vmalloc for incompatible gfp flags") we can simplify the caller and trust kvzalloc() to just do the right thing. For the case of the GFP_ATOMIC context, we can drop the __GFP_NORETRY flag for obvious reasons, and for the __GFP_NOWARN case, however, it is changed such that the caller passes the flag instead of making bucket_table_alloc() handle it. This slightly changes the gfp flags passed on to nested_table_alloc() as it will now also use GFP_ATOMIC | __GFP_NOWARN. However, I consider this a positive consequence as for the same reasons we want nowarn semantics in bucket_table_alloc(). [manfred@colorfullife.com: commit id extended to 12 digits, line wraps updated] Link: http://lkml.kernel.org/r/20180712185241.4017-8-manfred@colorfullife.com Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Kees Cook <keescook@chromium.org> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/assoc_array.c')
0 files changed, 0 insertions, 0 deletions