]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/vmscan.c
[PATCH] SwapMig: add_to_swap() avoid atomic allocations
[linux-2.6-omap-h63xx.git] / mm / vmscan.c
index daed4a73b761c0abdff9367e9c23235f2598202f..5393b093a87ba898bb88aec37691bbd795186580 100644 (file)
@@ -458,7 +458,7 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
                 * Try to allocate it some swap space here.
                 */
                if (PageAnon(page) && !PageSwapCache(page)) {
-                       if (!add_to_swap(page))
+                       if (!add_to_swap(page, GFP_ATOMIC))
                                goto activate_locked;
                }
 #endif /* CONFIG_SWAP */
@@ -715,7 +715,7 @@ redo:
                }
 
                if (PageAnon(page) && !PageSwapCache(page)) {
-                       if (!add_to_swap(page)) {
+                       if (!add_to_swap(page, GFP_KERNEL)) {
                                unlock_page(page);
                                list_move(&page->lru, &failed);
                                nr_failed++;