[PATCH 4/6] LBS: fix oops in try_to_release_page

From: Hugh Dickins
Date: Fri Sep 21 2007 - 17:01:07 EST


It's uncommon, but try_to_release_page is sometimes called when
page->mapping is NULL (see the check for mapping further down):
so its VM_BUG_ON(mapping_order(mapping)...) just causes an oops.
There seem to be enough of those checks already, and no special
reason to have one right here: just delete it.

Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>

--- 2.6.23-rc6-lbs/mm/filemap.c 2007-09-11 20:01:08.000000000 +0100
+++ linux/mm/filemap.c 2007-09-14 12:00:06.000000000 +0100
@@ -2247,7 +2247,6 @@ int try_to_release_page(struct page *pag
struct address_space * const mapping = page->mapping;

BUG_ON(!PageLocked(page));
- VM_BUG_ON(mapping_order(mapping) != page_cache_page_order(page));
if (PageWriteback(page))
return 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/