summaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-06-25 15:27:04 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-09-27 15:27:31 +0200
commit8f425e4ed0eb3ef0b2d85a9efccf947ca6aa9b1c (patch)
tree4fb8ccee7ba7f7f6895939375098cc4cdaba2ea7 /mm/shmem.c
parentmm/memcg: Convert commit_charge() to take a folio (diff)
downloadlinux-8f425e4ed0eb3ef0b2d85a9efccf947ca6aa9b1c.tar.xz
linux-8f425e4ed0eb3ef0b2d85a9efccf947ca6aa9b1c.zip
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/shmem.c')
-rw-r--r--mm/shmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index b5860f4a2738..a2e653aeb536 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -710,7 +710,7 @@ static int shmem_add_to_page_cache(struct page *page,
page->index = index;
if (!PageSwapCache(page)) {
- error = mem_cgroup_charge(page, charge_mm, gfp);
+ error = mem_cgroup_charge(page_folio(page), charge_mm, gfp);
if (error) {
if (PageTransHuge(page)) {
count_vm_event(THP_FILE_FALLBACK);