aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 85e95f445022..486184d2b50c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1132,9 +1132,6 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
1132 zone->pages_scanned += nr_scan; 1132 zone->pages_scanned += nr_scan;
1133 spin_unlock_irq(&zone->lru_lock); 1133 spin_unlock_irq(&zone->lru_lock);
1134 1134
1135 if (nr_taken == 0)
1136 goto done;
1137
1138 nr_scanned += nr_scan; 1135 nr_scanned += nr_scan;
1139 nr_freed = shrink_page_list(&page_list, sc); 1136 nr_freed = shrink_page_list(&page_list, sc);
1140 nr_reclaimed += nr_freed; 1137 nr_reclaimed += nr_freed;
@@ -1146,6 +1143,9 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
1146 __mod_page_state_zone(zone, pgscan_direct, nr_scan); 1143 __mod_page_state_zone(zone, pgscan_direct, nr_scan);
1147 __mod_page_state_zone(zone, pgsteal, nr_freed); 1144 __mod_page_state_zone(zone, pgsteal, nr_freed);
1148 1145
1146 if (nr_taken == 0)
1147 goto done;
1148
1149 spin_lock(&zone->lru_lock); 1149 spin_lock(&zone->lru_lock);
1150 /* 1150 /*
1151 * Put back any unfreeable pages. 1151 * Put back any unfreeable pages.
@@ -1166,8 +1166,9 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
1166 } 1166 }
1167 } 1167 }
1168 } while (nr_scanned < max_scan); 1168 } while (nr_scanned < max_scan);
1169 spin_unlock_irq(&zone->lru_lock); 1169 spin_unlock(&zone->lru_lock);
1170done: 1170done:
1171 local_irq_enable();
1171 pagevec_release(&pvec); 1172 pagevec_release(&pvec);
1172 return nr_reclaimed; 1173 return nr_reclaimed;
1173} 1174}