]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/vmscan.c
vmscan: let GFP_NOFS go to swap again
[linux-2.6-omap-h63xx.git] / mm / vmscan.c
index c141b3e780719d314a5010f702190d8a9c56c23b..f83a7ed5c6c43ef6fb80d95777affedd9e43b51b 100644 (file)
@@ -623,6 +623,8 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                 * Try to allocate it some swap space here.
                 */
                if (PageAnon(page) && !PageSwapCache(page)) {
+                       if (!(sc->gfp_mask & __GFP_IO))
+                               goto keep_locked;
                        switch (try_to_munlock(page)) {
                        case SWAP_FAIL:         /* shouldn't happen */
                        case SWAP_AGAIN:
@@ -634,6 +636,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
                        }
                        if (!add_to_swap(page, GFP_ATOMIC))
                                goto activate_locked;
+                       may_enter_fs = 1;
                }
 #endif /* CONFIG_SWAP */