zone->pages_scanned += nr_scan;
spin_unlock_irq(&zone->lru_lock);
- if (nr_taken == 0)
- goto done;
-
nr_scanned += nr_scan;
nr_freed = shrink_page_list(&page_list, sc);
nr_reclaimed += nr_freed;
__mod_page_state_zone(zone, pgscan_direct, nr_scan);
__mod_page_state_zone(zone, pgsteal, nr_freed);
+ if (nr_taken == 0)
+ goto done;
+
spin_lock(&zone->lru_lock);
/*
* Put back any unfreeable pages.
}
}
} while (nr_scanned < max_scan);
- spin_unlock_irq(&zone->lru_lock);
+ spin_unlock(&zone->lru_lock);
done:
+ local_irq_enable();
pagevec_release(&pvec);
return nr_reclaimed;
}