summaryrefslogtreecommitdiff
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-12-27 21:11:34 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 12:59:01 -0400
commit3ecb0087ecee6213544a1e0b838826a0f4831ce5 (patch)
treecb93690894085fa7db78b2cbc4ddc858fa247da3 /mm/vmscan.c
parent8927f6473e56e32e328ae8ed43736412f7f76a4e (diff)
downloadlwn-3ecb0087ecee6213544a1e0b838826a0f4831ce5.tar.gz
lwn-3ecb0087ecee6213544a1e0b838826a0f4831ce5.zip
mm/memcg: Convert mem_cgroup_swapout() to take a folio
This removes an assumption that THPs are the only kind of compound pages and removes a couple of hidden calls to compound_head. It also documents that you can't pass a tail page to mem_cgroup_swapout(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3b96f6e7d895..4f54c6d22083 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1288,7 +1288,7 @@ static int __remove_mapping(struct address_space *mapping, struct page *page,
if (PageSwapCache(page)) {
swp_entry_t swap = { .val = page_private(page) };
- mem_cgroup_swapout(page, swap);
+ mem_cgroup_swapout(folio, swap);
if (reclaimed && !mapping_exiting(mapping))
shadow = workingset_eviction(folio, target_memcg);
__delete_from_swap_cache(page, swap, shadow);