Commit b8557d1
memcg: Convert mem_cgroup_from_obj_folio() to mem_cgroup_from_obj_slab()
In preparation for splitting struct slab from struct page and struct
folio, convert the pointer to a slab rather than a folio. This means
we can end up passing a NULL slab pointer to mem_cgroup_from_obj_slab()
if the pointer is not to a page allocated to slab, and we handle that
appropriately by returning NULL.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: cgroups@vger.kernel.org
Link: https://patch.msgid.link/20251113000932.1589073-15-willy@infradead.org
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>1 parent 5934b1b commit b8557d1
1 file changed
Lines changed: 16 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2557 | 2557 | | |
2558 | 2558 | | |
2559 | 2559 | | |
2560 | | - | |
| 2560 | + | |
2561 | 2561 | | |
2562 | 2562 | | |
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
2567 | | - | |
2568 | | - | |
2569 | | - | |
2570 | | - | |
2571 | | - | |
2572 | | - | |
2573 | | - | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
| 2567 | + | |
| 2568 | + | |
2580 | 2569 | | |
| 2570 | + | |
| 2571 | + | |
2581 | 2572 | | |
2582 | | - | |
2583 | 2573 | | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
2592 | 2579 | | |
2593 | 2580 | | |
2594 | 2581 | | |
| |||
2602 | 2589 | | |
2603 | 2590 | | |
2604 | 2591 | | |
| 2592 | + | |
| 2593 | + | |
2605 | 2594 | | |
2606 | 2595 | | |
2607 | 2596 | | |
2608 | | - | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
2609 | 2601 | | |
2610 | 2602 | | |
2611 | 2603 | | |
| |||
0 commit comments