summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-18 08:56:47 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 12:59:02 -0400
commit346cf61311f6e348337e95aa2febe29e86137f42 (patch)
tree5213d42955d315652e3cd0d1633e693e4a1afda4 /mm
parent4ba1119cd53166d853050ff1a9d76079cd8f8e06 (diff)
downloadlinux-stable-346cf61311f6e348337e95aa2febe29e86137f42.tar.gz
linux-stable-346cf61311f6e348337e95aa2febe29e86137f42.tar.bz2
linux-stable-346cf61311f6e348337e95aa2febe29e86137f42.zip
mm: Add split_folio_to_list()
This is a convenience function; split_huge_page_to_list() can take any page in a folio (and does so on purpose because that page will be the one which keeps the refcount). But it's convenient for the callers to pass the folio instead of the first page in the folio. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 815fe89d37f9..94729d2d1125 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1715,16 +1715,16 @@ retry:
* tail pages can be freed without IO.
*/
if (!compound_mapcount(page) &&
- split_huge_page_to_list(page,
- page_list))
+ split_folio_to_list(folio,
+ page_list))
goto activate_locked;
}
if (!add_to_swap(page)) {
if (!PageTransHuge(page))
goto activate_locked_split;
/* Fallback to swap normal pages */
- if (split_huge_page_to_list(page,
- page_list))
+ if (split_folio_to_list(folio,
+ page_list))
goto activate_locked;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
count_vm_event(THP_SWPOUT_FALLBACK);
@@ -1740,7 +1740,7 @@ retry:
}
} else if (unlikely(PageTransHuge(page))) {
/* Split file THP */
- if (split_huge_page_to_list(page, page_list))
+ if (split_folio_to_list(folio, page_list))
goto keep_locked;
}