Showing error 1166

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: mm/vmscan.c
Line in file: 2447
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

2417{
2418        pgoff_t next = 0;
2419        pgoff_t end   = (i_size_read(mapping->host) + PAGE_CACHE_SIZE - 1) >>
2420                         PAGE_CACHE_SHIFT;
2421        struct zone *zone;
2422        struct pagevec pvec;
2423
2424        if (mapping->nrpages == 0)
2425                return;
2426
2427        pagevec_init(&pvec, 0);
2428        while (next < end &&
2429                pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) {
2430                int i;
2431                int pg_scanned = 0;
2432
2433                zone = NULL;
2434
2435                for (i = 0; i < pagevec_count(&pvec); i++) {
2436                        struct page *page = pvec.pages[i];
2437                        pgoff_t page_index = page->index;
2438                        struct zone *pagezone = page_zone(page);
2439
2440                        pg_scanned++;
2441                        if (page_index > next)
2442                                next = page_index;
2443                        next++;
2444
2445                        if (pagezone != zone) {
2446                                if (zone)
2447                                        spin_unlock_irq(&zone->lru_lock);
2448                                zone = pagezone;
2449                                spin_lock_irq(&zone->lru_lock);
2450                        }
2451
2452                        if (PageLRU(page) && PageUnevictable(page))
2453                                check_move_unevictable_page(page, zone);
2454                }
2455                if (zone)
2456                        spin_unlock_irq(&zone->lru_lock);
2457                pagevec_release(&pvec);
Show full sources