memcg_slabinfo: Fix use of PG_slab

Check PGTY_slab instead of PG_slab.

Fixes: 4ffca5a966 (mm: support only one page_type per page)
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Roman Gushchin <roman.gushchin@linux.dev>
Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Link: https://patch.msgid.link/20250611155916.2579160-11-willy@infradead.org
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
This commit is contained in:
Matthew Wilcox (Oracle) 2025-06-11 16:59:13 +01:00 committed by Vlastimil Babka
parent 97189f84a1
commit 7f770e94d7

View file

@ -146,11 +146,11 @@ def detect_kernel_config():
def for_each_slab(prog):
PGSlab = ~prog.constant('PG_slab')
slabtype = prog.constant('PGTY_slab')
for page in for_each_page(prog):
try:
if page.page_type.value_() == PGSlab:
if (page.page_type.value_() >> 24) == slabtype:
yield cast('struct slab *', page)
except FaultError:
pass