summaryrefslogtreecommitdiff
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f54a05b7a61d..591fe1b74c14 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1344,8 +1344,8 @@ static int too_many_isolated(struct zone *zone, int file,
*/
static noinline_for_stack void
putback_lru_pages(struct zone *zone, struct scan_control *sc,
- unsigned long nr_anon, unsigned long nr_file,
- struct list_head *page_list)
+ unsigned long nr_anon, unsigned long nr_file,
+ struct list_head *page_list, unsigned long nr_reclaimed)
{
struct page *page;
struct pagevec pvec;
@@ -1356,7 +1356,12 @@ putback_lru_pages(struct zone *zone, struct scan_control *sc,
/*
* Put back any unfreeable pages.
*/
- spin_lock(&zone->lru_lock);
+ spin_lock_irq(&zone->lru_lock);
+
+ if (current_is_kswapd())
+ __count_vm_events(KSWAPD_STEAL, nr_reclaimed);
+ __count_zone_vm_events(PGSTEAL, zone, nr_reclaimed);
+
while (!list_empty(page_list)) {
int lru;
page = lru_to_page(page_list);
@@ -1539,12 +1544,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone,
priority, &nr_dirty, &nr_writeback);
}
- local_irq_disable();
- if (current_is_kswapd())
- __count_vm_events(KSWAPD_STEAL, nr_reclaimed);
- __count_zone_vm_events(PGSTEAL, zone, nr_reclaimed);
-
- putback_lru_pages(zone, sc, nr_anon, nr_file, &page_list);
+ putback_lru_pages(zone, sc, nr_anon, nr_file, &page_list, nr_reclaimed);
/*
* If reclaim is isolating dirty pages under writeback, it implies