From: Andrew Morton Date: Mon, 28 Apr 2008 09:12:44 +0000 (-0700) Subject: page_mapping(): add ifdef around reference to swapper_space X-Git-Tag: v2.6.26-rc1~972 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=726b80127239aeea9c8d8aad5b4e2c80313e3ce8;p=linux-2.6-omap-h63xx.git page_mapping(): add ifdef around reference to swapper_space 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 Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mm.h b/include/linux/mm.h index 24659ed06ba..4f3c1b2f44d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -605,9 +605,12 @@ static inline struct address_space *page_mapping(struct page *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; }