]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/slab: replace slab_alloc_node() parameters with slab_alloc_context
authorVlastimil Babka (SUSE) <vbabka@kernel.org>
Wed, 10 Jun 2026 15:40:12 +0000 (17:40 +0200)
committerVlastimil Babka (SUSE) <vbabka@kernel.org>
Mon, 15 Jun 2026 11:24:45 +0000 (13:24 +0200)
commitb5ecc070d1962a130ca5acc3a40b515035e5d21f
treed2f58c19d4ca40ea2f9115cfa07d209222431166
parentef7f97aa2ce8d59eda0faa9bb40f6263f0d80d5f
mm/slab: replace slab_alloc_node() parameters with slab_alloc_context

The function takes all the parameters that exist as fields in
slab_alloc_context, except alloc_flags. Replace them with a single
pointer.

This moves slab_alloc_context initialization to a number of callers,
which is more verbose, but arguably also more clear than a long list of
parameters, and most do not use the 'lru' field.

This will also allow kmalloc_nolock() to call slab_alloc_node() and
reduce the special open-coding it currently has.

Link: https://patch.msgid.link/20260610-slab_alloc_flags-v2-10-7190909db118@kernel.org
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org>
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
mm/slub.c