Couple of last-minute fixes please:
- Partial fix for the LRU race which Christian Ehrhardt identified.
- Delete a bogus BUG() in __page_cache_release
void __page_cache_release(struct page *page)
{
unsigned long flags;
- BUG_ON(page_count(page) != 0);
spin_lock_irqsave(&_pagemap_lru_lock, flags);
if (TestClearPageLRU(page)) {
prefetchw_prev_lru_page(page, &active_list, flags);
if (!TestClearPageLRU(page))
BUG();
+ list_del(&page->lru);
+ if (page_count(page) == 0) {
+ /* It is currently in pagevec_release() */
+ SetPageLRU(page);
+ list_add(&page->lru, &active_list);
+ continue;
+ }
page_cache_get(page);
- list_move(&page->lru, &l_hold);
+ list_add(&page->lru, &l_hold);
nr_pages--;
}
spin_unlock_irq(&_pagemap_lru_lock);