]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/vmscan.c
vmscan: protect zone rotation stats by lru lock
[linux-2.6-omap-h63xx.git] / mm / vmscan.c
index 7ea1440b53db23350112cb1a46c592542807e4ac..62e7f62fb559c7a09b5b15b4d7a0b3a7b5b4c5e5 100644 (file)
@@ -1248,6 +1248,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
                list_add(&page->lru, &l_inactive);
        }
 
+       spin_lock_irq(&zone->lru_lock);
        /*
         * Count referenced pages from currently used mappings as
         * rotated, even though they are moved to the inactive list.
@@ -1263,7 +1264,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
 
        pgmoved = 0;
        lru = LRU_BASE + file * LRU_FILE;
-       spin_lock_irq(&zone->lru_lock);
        while (!list_empty(&l_inactive)) {
                page = lru_to_page(&l_inactive);
                prefetchw_prev_lru_page(page, &l_inactive, flags);