diff options
-rw-r--r-- | mm/vmscan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 0ca6007d655b..a29efb2c06c8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -492,7 +492,7 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc) | |||
492 | goto keep_locked; | 492 | goto keep_locked; |
493 | if (!may_enter_fs) | 493 | if (!may_enter_fs) |
494 | goto keep_locked; | 494 | goto keep_locked; |
495 | if (laptop_mode && !sc->may_writepage) | 495 | if (!sc->may_writepage) |
496 | goto keep_locked; | 496 | goto keep_locked; |
497 | 497 | ||
498 | /* Page is dirty, try to write it out here */ | 498 | /* Page is dirty, try to write it out here */ |
@@ -1170,7 +1170,7 @@ int try_to_free_pages(struct zone **zones, gfp_t gfp_mask) | |||
1170 | int i; | 1170 | int i; |
1171 | 1171 | ||
1172 | sc.gfp_mask = gfp_mask; | 1172 | sc.gfp_mask = gfp_mask; |
1173 | sc.may_writepage = 0; | 1173 | sc.may_writepage = !laptop_mode; |
1174 | sc.may_swap = 1; | 1174 | sc.may_swap = 1; |
1175 | 1175 | ||
1176 | inc_page_state(allocstall); | 1176 | inc_page_state(allocstall); |
@@ -1273,7 +1273,7 @@ loop_again: | |||
1273 | total_scanned = 0; | 1273 | total_scanned = 0; |
1274 | total_reclaimed = 0; | 1274 | total_reclaimed = 0; |
1275 | sc.gfp_mask = GFP_KERNEL; | 1275 | sc.gfp_mask = GFP_KERNEL; |
1276 | sc.may_writepage = 0; | 1276 | sc.may_writepage = !laptop_mode; |
1277 | sc.may_swap = 1; | 1277 | sc.may_swap = 1; |
1278 | sc.nr_mapped = read_page_state(nr_mapped); | 1278 | sc.nr_mapped = read_page_state(nr_mapped); |
1279 | 1279 | ||