[Devel] [KERNEL COMMIT]: diff-ms-mm-pageprivate-20051213

Kirill Korotaev dev at sw.ru
Wed Dec 14 01:04:52 PST 2005


Committed in 022stab055

Patch from Dmitry (dim@):
fixed race in pagevec_strip
Bug #56040
Bug #55235

-------------- next part --------------
--- ./mm/swap.c.bh	2005-12-13 15:25:05.000000000 +0300
+++ ./mm/swap.c	2005-12-13 15:26:51.000000000 +0300
@@ -351,7 +351,9 @@ void pagevec_strip(struct pagevec *pvec)
 		struct page *page = pvec->pages[i];
 
 		if (PagePrivate(page) && !TestSetPageLocked(page)) {
-			try_to_release_page(page, 0);
+			/* need to recheck after lock */
+			if (page_has_buffers(page))
+				try_to_release_page(page, 0);
 			unlock_page(page);
 		}
 	}


More information about the Devel mailing list