Skip to content

Commit 726b801

Browse files
akpm00torvalds
authored andcommitted
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>
1 parent 1cdf25d commit 726b801

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎include/linux/mm.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,12 @@ static inline struct address_space *page_mapping(struct page *page)
605605
struct address_space *mapping = page->mapping;
606606

607607
VM_BUG_ON(PageSlab(page));
608+
#ifdef CONFIG_SWAP
608609
if (unlikely(PageSwapCache(page)))
609610
mapping = &swapper_space;
610-
else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
611+
else
612+
#endif
613+
if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
611614
mapping = NULL;
612615
return mapping;
613616
}

0 commit comments

Comments
 (0)