Skip to content

Commit

Permalink
page_mapping(): add ifdef around reference to swapper_space
Browse files Browse the repository at this point in the history
This fixes the superh build when the pageflags patches are applied.

But it shouldn't unless it's a gcc bug.

Cc: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Apr 28, 2008
1 parent 1cdf25d commit 726b801
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 726b801

Please sign in to comment.