From d028fce0353d0d574274b1225deb4f8c958a2965 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 23 Mar 2003 03:49:56 -0800 Subject: [PATCH] [PATCH] don't include swap.h in mm.h swap.h is basically the header for MM internals instead of the public API (mm_internal.h would have been a better name..). Stop including it in mm.h - this only needs moving one function that should be in swap.h anyway to the right place and fixing up a bunch of places using it. --- drivers/block/ll_rw_blk.c | 1 + fs/bio.c | 2 +- include/linux/mm.h | 6 +----- include/linux/swap.h | 3 +++ kernel/sysctl.c | 1 + kernel/timer.c | 1 + mm/filemap.c | 1 + mm/fremap.c | 1 + mm/highmem.c | 1 + mm/page-writeback.c | 1 + mm/rmap.c | 1 + 11 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index b39418cdd5f9f..221ef195885c0 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -26,6 +26,7 @@ #include /* for max_pfn/max_low_pfn */ #include #include +#include static void blk_unplug_work(void *data); static void blk_unplug_timeout(unsigned long data); diff --git a/fs/bio.c b/fs/bio.c index 3002a6b05dd40..11f2fcf05d316 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -7,7 +7,6 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * @@ -17,6 +16,7 @@ * */ #include +#include #include #include #include diff --git a/include/linux/mm.h b/include/linux/mm.h index f6482a63c2508..c6c2eef39d626 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -8,10 +8,8 @@ #include #include -#include #include #include -#include #include #include @@ -142,6 +140,7 @@ struct vm_operations_struct { /* forward declaration; pte_chain is meant to be internal to rmap.c */ struct pte_chain; struct mmu_gather; +struct inode; /* * Each physical page in the system has a struct page associated with @@ -490,10 +489,7 @@ extern void free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap, extern void mem_init(void); extern void show_mem(void); extern void si_meminfo(struct sysinfo * val); -#ifdef CONFIG_NUMA extern void si_meminfo_node(struct sysinfo *val, int nid); -#endif -extern void swapin_readahead(swp_entry_t); /* mmap.c */ extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *); diff --git a/include/linux/swap.h b/include/linux/swap.h index c9067e103fdd1..cbe1374ccfae0 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -144,6 +144,9 @@ struct swap_list_t { /* linux/mm/oom_kill.c */ extern void out_of_memory(void); +/* linux/mm/memory.c */ +extern void swapin_readahead(swp_entry_t); + /* linux/mm/page_alloc.c */ extern unsigned long totalram_pages; extern unsigned long totalhigh_pages; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 0364833761c47..27cd5c65124f0 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/kernel/timer.c b/kernel/timer.c index 5bee9f921b67b..2ece11f78d922 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/mm/filemap.c b/mm/filemap.c index 6337882734357..32847b7283bde 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/mm/fremap.c b/mm/fremap.c index 489ae9eab0bc1..df1d2926dca80 100644 --- a/mm/fremap.c +++ b/mm/fremap.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/mm/highmem.c b/mm/highmem.c index 10fa9f26a548e..c67048ed930fb 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 28a7e425664b2..77d18b8b97aa4 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/mm/rmap.c b/mm/rmap.c index 9a9fb9729d9dc..6d3d2748cbdbb 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -22,6 +22,7 @@ */ #include #include +#include #include #include #include -- 2.53.0