diff options
author | Hugh Dickins <hugh@veritas.com> | 2007-06-21 18:27:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-21 18:55:12 -0400 |
commit | b9bae3402572dc50a1e084c5b1ae5117918ef0f0 (patch) | |
tree | b351181fffd09e06c0b3f185a0571cdb2860e870 | |
parent | f1518a088bde6aea49e7c472ed6ab96178fcba3e (diff) |
page_mapping must avoid slub pages
Nicolas Ferre reports oops from flush_dcache_page() on ARM when using
SLUB: which reuses page->mapping as page->slab. The page_mapping()
function, used by ARM and PA-RISC flush_dcache_page() implementations,
must not confuse SLUB pages with those which have page->mapping set.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/mm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index e4183c6c7de3..1c1207472bb4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -603,6 +603,10 @@ static inline struct address_space *page_mapping(struct page *page) | |||
603 | 603 | ||
604 | if (unlikely(PageSwapCache(page))) | 604 | if (unlikely(PageSwapCache(page))) |
605 | mapping = &swapper_space; | 605 | mapping = &swapper_space; |
606 | #ifdef CONFIG_SLUB | ||
607 | else if (unlikely(PageSlab(page))) | ||
608 | mapping = NULL; | ||
609 | #endif | ||
606 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) | 610 | else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) |
607 | mapping = NULL; | 611 | mapping = NULL; |
608 | return mapping; | 612 | return mapping; |