aboutsummaryrefslogtreecommitdiffstats
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, 2 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index daed4a73b761..5393b093a87b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -458,7 +458,7 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
458 * Try to allocate it some swap space here. 458 * Try to allocate it some swap space here.
459 */ 459 */
460 if (PageAnon(page) && !PageSwapCache(page)) { 460 if (PageAnon(page) && !PageSwapCache(page)) {
461 if (!add_to_swap(page)) 461 if (!add_to_swap(page, GFP_ATOMIC))
462 goto activate_locked; 462 goto activate_locked;
463 } 463 }
464#endif /* CONFIG_SWAP */ 464#endif /* CONFIG_SWAP */
@@ -715,7 +715,7 @@ redo:
715 } 715 }
716 716
717 if (PageAnon(page) && !PageSwapCache(page)) { 717 if (PageAnon(page) && !PageSwapCache(page)) {
718 if (!add_to_swap(page)) { 718 if (!add_to_swap(page, GFP_KERNEL)) {
719 unlock_page(page); 719 unlock_page(page);
720 list_move(&page->lru, &failed); 720 list_move(&page->lru, &failed);
721 nr_failed++; 721 nr_failed++;