summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton2008-04-28 11:12:44 +0200
committerLinus Torvalds2008-04-28 17:58:21 +0200
commit726b80127239aeea9c8d8aad5b4e2c80313e3ce8 (patch)
tree4b4df86f199f9bf9689f038132a8922f34a9c8d4
parentkbuild: create a way to create preprocessor constants from C expressions (diff)
downloadkernel-qcow2-linux-726b80127239aeea9c8d8aad5b4e2c80313e3ce8.tar.gz
kernel-qcow2-linux-726b80127239aeea9c8d8aad5b4e2c80313e3ce8.tar.xz
kernel-qcow2-linux-726b80127239aeea9c8d8aad5b4e2c80313e3ce8.zip
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>
-rw-r--r--include/linux/mm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 24659ed06bae..4f3c1b2f44de 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;
}