On Thu, 16 Mar 2006, Hugh Dickins wrote:
> But wouldn't you, on balance, be better off repeating the
> PagePrivate test within the lock?
Good idea. That avoid uselessly taking the pagelock.
Seems that we can call try_to_release_page with PagePrivate off and a
valid mapping because we check PagePrivate before taking the page lock.
This may cause all sorts of trouble for thefilesystem *_releasepage()
handlers. XFS bombs out in that case.
Check the PagePrivate again before calling try_to_release_page.
Signed-off-by: Christoph Lameter <[email protected]>
Index: linux-2.6.16-rc6/mm/swap.c
===================================================================
--- linux-2.6.16-rc6.orig/mm/swap.c 2006-03-11 14:12:55.000000000 -0800
+++ linux-2.6.16-rc6/mm/swap.c 2006-03-16 11:46:54.000000000 -0800
@@ -393,7 +393,8 @@ void pagevec_strip(struct pagevec *pvec)
struct page *page = pvec->pages[i];
if (PagePrivate(page) && !TestSetPageLocked(page)) {
- try_to_release_page(page, 0);
+ if (PagePrivate(page))
+ try_to_release_page(page, 0);
unlock_page(page);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]