export swapper_space
Subsystems (2)
PATCH 1/1 export swapper_space
This is now used as part of the page_mapping() macro. However, certain filesystems, such as ext3, make use of this. If it's not exported, they can't be compiled as modules.
James
===== mm/swap_state.c 1.77 vs edited =====
mm/swap_state.c +2 -0
@@ -14,6 +14,7 @@#include <linux/pagemap.h> #include <linux/buffer_head.h> #include <linux/backing-dev.h> +#include <linux/module.h> #include <asm/pgtable.h>
@@ -38,6 +39,7 @@ .a_ops = &swap_aops, .backing_dev_info = &swap_backing_dev_info, }; +EXPORT_SYMBOL (swapper_space);#define INC_CACHE_INFO (x) do { swap_cache_info.x++; } while (0)
Quoted 3 lines · James Bottomley
This is now used as part of the
page_mapping()macro. However, certain filesystems, such as ext3, make use of this. If it's not exported, they can't be compiled as modules.
A filesystem (except for tmpfs of course) using page_mapping() looks
like a bug to me. I can't find ext3 using it anyway..
Quoted 4 lines · James Bottomley
This is now used as part of the
page_mapping()macro. However, certain filesystems, such as ext3, make use of this. If it's not exported, they can't be compiled as modules.
I'd be a bit reluctant to do this. filesystems actually have no need for page_mapping() - page->mapping is always correct in that context and page_mapping() has additional overhead. So if poss we should avoid this export so as to force filesystems to avoid page_mapping().
parisc broke because its flush_dcache_page() is inlined, and it uses page_mapping(). I'd suggest that parisc and arm uninline that function - it's quite large anyway.
Quoted 8 lines · Andrew Morton
I'd be a bit reluctant to do this. filesystems actually have no need for
page_mapping()-page->mappingis always correct in that context andpage_mapping()has additional overhead. So if poss we should avoid this export so as to force filesystems to avoidpage_mapping().parisc broke because its
flush_dcache_page()is inlined, and it usespage_mapping(). I'd suggest that parisc and arm uninline that function - it's quite large anyway.
You mean our fast path for flush_dcache_page
static inline void flush_dcache_page(struct page *page)
{
struct address_space *mapping = page_mapping(page);
if (mapping && !mapping_mapped(mapping)) {
set_bit(PG_dcache_dirty, &page->flags);
} else {
__flush_dcache_page(page);
}
}Yes, that's the culprit...I suppose we could uninline it.
James