Re: [2.6 patch] mm/swap_state.c: unexport swapper_space

From: Hugh Dickins
Date: Sun Mar 06 2005 - 10:30:37 EST


On Sun, 6 Mar 2005, Adrian Bunk wrote:

> I didn't find any possible modular usage in the kernel.
>
> Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>
>
> --- linux-2.6.11-mm1-full/mm/swap_state.c.old 2005-03-04 16:25:54.000000000 +0100
> +++ linux-2.6.11-mm1-full/mm/swap_state.c 2005-03-04 16:26:16.000000000 +0100
> @@ -40,7 +40,6 @@
> .i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
> .backing_dev_info = &swap_backing_dev_info,
> };
> -EXPORT_SYMBOL(swapper_space);
>
> #define INC_CACHE_INFO(x) do { swap_cache_info.x++; } while (0)

I think this one should stay exported (or at least be re-exported
immediately on demand). It's used by the inline page_mapping() in
include/linux/mm.h, which _was_ used by various arch cacheflushing
inlines, which could reasonably be called from modular filesystems.

I think those architectures hit the missed export when the dependence
on &swapper_space got added to page_mapping(), the export was soon
added to mainline, but meanwhile they moved their inlines out-of-line
- perhaps temporarily, but not yet reverted.

Better leave it exported so long as page_mapping is using it.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/