mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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:
parent
97189f84a1
commit
7f770e94d7
@ -146,11 +146,11 @@ def detect_kernel_config():
|
|||||||
|
|
||||||
|
|
||||||
def for_each_slab(prog):
|
def for_each_slab(prog):
|
||||||
PGSlab = ~prog.constant('PG_slab')
|
slabtype = prog.constant('PGTY_slab')
|
||||||
|
|
||||||
for page in for_each_page(prog):
|
for page in for_each_page(prog):
|
||||||
try:
|
try:
|
||||||
if page.page_type.value_() == PGSlab:
|
if (page.page_type.value_() >> 24) == slabtype:
|
||||||
yield cast('struct slab *', page)
|
yield cast('struct slab *', page)
|
||||||
except FaultError:
|
except FaultError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user