diff options
author | Alex Shi (Tencent) <alexs@kernel.org> | 2024-07-12 12:14:35 +0800 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-07-15 10:42:30 +0200 |
commit | a52c6330ff2fe1163333fa6609bdc6e8763ec286 (patch) | |
tree | 8b27b8d9841e632c9ec9b70ff9b06891c215d03b /mm | |
parent | 7b1fdf2ba4bc1434bb4c0077d7c9079a5a45df27 (diff) | |
download | linux-a52c6330ff2fe1163333fa6609bdc6e8763ec286.tar.gz linux-a52c6330ff2fe1163333fa6609bdc6e8763ec286.tar.bz2 linux-a52c6330ff2fe1163333fa6609bdc6e8763ec286.zip |
mm/memcg: alignment memcg_data define condition
commit 21c690a349ba ("mm: introduce slabobj_ext to support slab object
extensions") changed the folio/page->memcg_data define condition from
MEMCG to SLAB_OBJ_EXT. This action make memcg_data exposed while !MEMCG.
As Vlastimil Babka suggested, let's add _unused_slab_obj_exts for
SLAB_MATCH for slab.obj_exts while !MEMCG. That could resolve the match
issue, clean up the feature logical.
Signed-off-by: Alex Shi (Tencent) <alexs@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yoann Congal <yoann.congal@smile.fr>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/slab.h b/mm/slab.h index 5f8f47c5bee0..a240945487e0 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -97,8 +97,10 @@ struct slab { SLAB_MATCH(flags, __page_flags); SLAB_MATCH(compound_head, slab_cache); /* Ensure bit 0 is clear */ SLAB_MATCH(_refcount, __page_refcount); -#ifdef CONFIG_SLAB_OBJ_EXT +#ifdef CONFIG_MEMCG SLAB_MATCH(memcg_data, obj_exts); +#elif defined(CONFIG_SLAB_OBJ_EXT) +SLAB_MATCH(_unused_slab_obj_exts, obj_exts); #endif #undef SLAB_MATCH static_assert(sizeof(struct slab) <= sizeof(struct page)); |