Commit d028fce0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[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.
parent f635f093
......@@ -26,6 +26,7 @@
#include <linux/bootmem.h> /* for max_pfn/max_low_pfn */
#include <linux/completion.h>
#include <linux/slab.h>
#include <linux/swap.h>
static void blk_unplug_work(void *data);
static void blk_unplug_timeout(unsigned long data);
......
......@@ -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 <linux/mm.h>
#include <linux/swap.h>
#include <linux/bio.h>
#include <linux/blk.h>
#include <linux/slab.h>
......
......@@ -8,10 +8,8 @@
#include <linux/config.h>
#include <linux/gfp.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/mmzone.h>
#include <linux/swap.h>
#include <linux/rbtree.h>
#include <linux/fs.h>
......@@ -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 *);
......
......@@ -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;
......
......@@ -20,6 +20,7 @@
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
......
......@@ -24,6 +24,7 @@
#include <linux/percpu.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/notifier.h>
#include <linux/thread_info.h>
#include <linux/time.h>
......
......@@ -17,6 +17,7 @@
#include <linux/aio.h>
#include <linux/kernel_stat.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/mman.h>
#include <linux/pagemap.h>
#include <linux/file.h>
......
......@@ -7,6 +7,7 @@
*/
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/file.h>
#include <linux/mman.h>
#include <linux/pagemap.h>
......
......@@ -17,6 +17,7 @@
*/
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/bio.h>
#include <linux/pagemap.h>
#include <linux/mempool.h>
......
......@@ -15,6 +15,7 @@
#include <linux/spinlock.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/writeback.h>
......
......@@ -22,6 +22,7 @@
*/
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/slab.h>
#include <linux/init.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment