Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

slub: let need_slab_obj_exts() return false if SLAB_NO_OBJ_EXT is set

SLAB_NO_OBJ_EXT is set for boot caches, but need_slab_obj_exts() doesn't
check this flag. We should return false unconditionally when
SLAB_NO_OBJ_EXT is set.

Signed-off-by: Hao Li <hao.li@linux.dev>
Acked-by: Harry Yoo <harry.yoo@oracle.com>
Link: https://patch.msgid.link/20260205120709.425719-1-hao.li@linux.dev
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

authored by

Hao Li and committed by
Vlastimil Babka
98e99fc4 2f35fee9

+3
+3
mm/slub.c
··· 898 898 */ 899 899 static inline bool need_slab_obj_exts(struct kmem_cache *s) 900 900 { 901 + if (s->flags & SLAB_NO_OBJ_EXT) 902 + return false; 903 + 901 904 if (memcg_kmem_online() && (s->flags & SLAB_ACCOUNT)) 902 905 return true; 903 906