From: Andrew Morton This fixes the superh build when the pageflags patches are applied. But it shouldn't unless it's a gcc bug. Cc: Christoph Lameter Signed-off-by: Andrew Morton --- include/linux/mm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN include/linux/mm.h~page_mapping-add-ifdef-around-reference-to-swapper_space include/linux/mm.h --- a/include/linux/mm.h~page_mapping-add-ifdef-around-reference-to-swapper_space +++ a/include/linux/mm.h @@ -605,9 +605,12 @@ static inline struct address_space *page struct address_space *mapping = page->mapping; VM_BUG_ON(PageSlab(page)); +#ifdef CONFIG_SWAP if (unlikely(PageSwapCache(page))) mapping = &swapper_space; - else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) + else +#endif + if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON)) mapping = NULL; return mapping; } _