diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-06-25 16:27:04 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-09-27 16:27:31 +0300 |
commit | 8f425e4ed0eb3ef0b2d85a9efccf947ca6aa9b1c (patch) | |
tree | 4fb8ccee7ba7f7f6895939375098cc4cdaba2ea7 /mm/ksm.c | |
parent | 118f2875490b027218594db9e2effb52cebc7693 (diff) | |
download | linux-8f425e4ed0eb3ef0b2d85a9efccf947ca6aa9b1c.tar.xz |
mm/memcg: Convert mem_cgroup_charge() to take a folio
Convert all callers of mem_cgroup_charge() to call page_folio() on the
page they're currently passing in. Many of them will be converted to
use folios themselves soon.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2578,7 +2578,8 @@ struct page *ksm_might_need_to_copy(struct page *page, return page; /* let do_swap_page report the error */ new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address); - if (new_page && mem_cgroup_charge(new_page, vma->vm_mm, GFP_KERNEL)) { + if (new_page && + mem_cgroup_charge(page_folio(new_page), vma->vm_mm, GFP_KERNEL)) { put_page(new_page); new_page = NULL; } |