Showing error 983

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: mm/swap.c
Line in file: 131
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

101 * pagevec_move_tail() must be called with IRQ disabled.
102 * Otherwise this may cause nasty races.
103 */
104static void pagevec_move_tail(struct pagevec *pvec)
105{
106        int i;
107        int pgmoved = 0;
108        struct zone *zone = NULL;
109
110        for (i = 0; i < pagevec_count(pvec); i++) {
111                struct page *page = pvec->pages[i];
112                struct zone *pagezone = page_zone(page);
113
114                if (pagezone != zone) {
115                        if (zone)
116                                spin_unlock(&zone->lru_lock);
117                        zone = pagezone;
118                        spin_lock(&zone->lru_lock);
119                }
120                if (PageLRU(page) && !PageActive(page) && !PageUnevictable(page)) {
121                        int lru = page_is_file_cache(page);
122                        list_move_tail(&page->lru, &zone->lru[lru].list);
123                        pgmoved++;
124                }
125        }
126        if (zone)
127                spin_unlock(&zone->lru_lock);
128        __count_vm_events(PGROTATED, pgmoved);
129        release_pages(pvec->pages, pvec->nr, pvec->cold);
130        pagevec_reinit(pvec);
131}
132
133/*
134 * Writeback is about to end against a page which has been marked for immediate
135 * reclaim.  If it still appears to be reclaimable, move it to the tail of the
136 * inactive list.
137 */
138void  rotate_reclaimable_page(struct page *page)
139{
140        if (!PageLocked(page) && !PageDirty(page) && !PageActive(page) &&
141            !PageUnevictable(page) && PageLRU(page)) {
Show full sources