|
@@ -623,6 +623,8 @@ static unsigned long shrink_page_list(struct list_head *page_list,
|
|
* Try to allocate it some swap space here.
|
|
* Try to allocate it some swap space here.
|
|
*/
|
|
*/
|
|
if (PageAnon(page) && !PageSwapCache(page)) {
|
|
if (PageAnon(page) && !PageSwapCache(page)) {
|
|
|
|
+ if (!(sc->gfp_mask & __GFP_IO))
|
|
|
|
+ goto keep_locked;
|
|
switch (try_to_munlock(page)) {
|
|
switch (try_to_munlock(page)) {
|
|
case SWAP_FAIL: /* shouldn't happen */
|
|
case SWAP_FAIL: /* shouldn't happen */
|
|
case SWAP_AGAIN:
|
|
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))
|
|
if (!add_to_swap(page, GFP_ATOMIC))
|
|
goto activate_locked;
|
|
goto activate_locked;
|
|
|
|
+ may_enter_fs = 1;
|
|
}
|
|
}
|
|
#endif /* CONFIG_SWAP */
|
|
#endif /* CONFIG_SWAP */
|
|
|
|
|