summaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 729e37f02de6..abaf0215a352 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1125,6 +1125,10 @@ static unsigned long shrink_page_list(struct list_head *page_list,
!PageSwapCache(page)) {
if (!(sc->gfp_mask & __GFP_IO))
goto keep_locked;
+ /* cannot split THP, skip it */
+ if (PageTransHuge(page) &&
+ !can_split_huge_page(page, NULL))
+ goto activate_locked;
if (!add_to_swap(page)) {
if (!PageTransHuge(page))
goto activate_locked;