]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/slab: introduce slab_alloc_context
authorVlastimil Babka (SUSE) <vbabka@kernel.org>
Wed, 10 Jun 2026 15:40:06 +0000 (17:40 +0200)
committerVlastimil Babka (SUSE) <vbabka@kernel.org>
Mon, 15 Jun 2026 11:16:27 +0000 (13:16 +0200)
commit203890bbd29266cfff412cab607d2027bd2951c5
tree242e765d85fa4f25dc13d9f2d2fccf9c69183468
parent5fd1c77e97decf78573843f4ad1ea3ddcc1ea102
mm/slab: introduce slab_alloc_context

Similarly to page allocator's struct alloc_context, introduce a helper
struct to hold a part of the allocation arguments. This will allow
reducing the number of parameters in many functions of the
implementation, and extend them easily if needed.

For now, make it hold the caller address and the originally requested
allocation size.

Convert alloc_single_from_new_slab(), __slab_alloc_node() and
___slab_alloc(). No functional change intended.

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