mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue