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>
This commit is contained in:
@@ -889,7 +889,7 @@ noinline int __add_to_page_cache_locked(struct page *page,
|
||||
page->index = offset;
|
||||
|
||||
if (!huge) {
|
||||
error = mem_cgroup_charge(page, NULL, gfp);
|
||||
error = mem_cgroup_charge(page_folio(page), NULL, gfp);
|
||||
if (error)
|
||||
goto error;
|
||||
charged = true;
|
||||
|
||||
Reference in New Issue
Block a user