mirror of https://gitee.com/openkylin/linux.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 <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1cdf25d704
commit
726b801272
|
@ -605,9 +605,12 @@ static inline struct address_space *page_mapping(struct page *page)
|
||||||
struct address_space *mapping = page->mapping;
|
struct address_space *mapping = page->mapping;
|
||||||
|
|
||||||
VM_BUG_ON(PageSlab(page));
|
VM_BUG_ON(PageSlab(page));
|
||||||
|
#ifdef CONFIG_SWAP
|
||||||
if (unlikely(PageSwapCache(page)))
|
if (unlikely(PageSwapCache(page)))
|
||||||
mapping = &swapper_space;
|
mapping = &swapper_space;
|
||||||
else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
|
else
|
||||||
|
#endif
|
||||||
|
if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
|
||||||
mapping = NULL;
|
mapping = NULL;
|
||||||
return mapping;
|
return mapping;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue