diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 843c87d1e61f..41d1064aabfb 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -417,7 +417,9 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) | |||
417 | * Anonymous process memory has backing store? | 417 | * Anonymous process memory has backing store? |
418 | * Try to allocate it some swap space here. | 418 | * Try to allocate it some swap space here. |
419 | */ | 419 | */ |
420 | if (PageAnon(page) && !PageSwapCache(page) && sc->may_swap) { | 420 | if (PageAnon(page) && !PageSwapCache(page)) { |
421 | if (!sc->may_swap) | ||
422 | goto keep_locked; | ||
421 | if (!add_to_swap(page)) | 423 | if (!add_to_swap(page)) |
422 | goto activate_locked; | 424 | goto activate_locked; |
423 | } | 425 | } |