aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 46fdaa546b8d..e656035d3406 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -647,6 +647,9 @@ free_it:
647 continue; 647 continue;
648 648
649activate_locked: 649activate_locked:
650 /* Not a candidate for swapping, so reclaim swap space. */
651 if (PageSwapCache(page) && vm_swap_full())
652 remove_exclusive_swap_page_ref(page);
650 SetPageActive(page); 653 SetPageActive(page);
651 pgactivate++; 654 pgactivate++;
652keep_locked: 655keep_locked:
@@ -1228,6 +1231,8 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1228 __mod_zone_page_state(zone, NR_ACTIVE, pgmoved); 1231 __mod_zone_page_state(zone, NR_ACTIVE, pgmoved);
1229 pgmoved = 0; 1232 pgmoved = 0;
1230 spin_unlock_irq(&zone->lru_lock); 1233 spin_unlock_irq(&zone->lru_lock);
1234 if (vm_swap_full())
1235 pagevec_swap_free(&pvec);
1231 __pagevec_release(&pvec); 1236 __pagevec_release(&pvec);
1232 spin_lock_irq(&zone->lru_lock); 1237 spin_lock_irq(&zone->lru_lock);
1233 } 1238 }
@@ -1237,6 +1242,8 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1237 __count_zone_vm_events(PGREFILL, zone, pgscanned); 1242 __count_zone_vm_events(PGREFILL, zone, pgscanned);
1238 __count_vm_events(PGDEACTIVATE, pgdeactivate); 1243 __count_vm_events(PGDEACTIVATE, pgdeactivate);
1239 spin_unlock_irq(&zone->lru_lock); 1244 spin_unlock_irq(&zone->lru_lock);
1245 if (vm_swap_full())
1246 pagevec_swap_free(&pvec);
1240 1247
1241 pagevec_release(&pvec); 1248 pagevec_release(&pvec);
1242} 1249}