diff options
author | Christoph Hellwig <hch@lst.de> | 2016-11-01 16:40:16 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-01 18:43:26 +0300 |
commit | be297968da22cf40c9c419df51e71ba8856a2ec2 (patch) | |
tree | 2aff842b99f54ff0c920f6fca1d53c531975240e /include/linux/swap.h | |
parent | 9f08217120568afdfb59973a89a675e649c0096d (diff) | |
download | linux-be297968da22cf40c9c419df51e71ba8856a2ec2.tar.xz |
mm: only include blk_types in swap.h if CONFIG_SWAP is enabled
It's only needed for the CONFIG_SWAP-only use of bio_end_io_t.
Because CONFIG_SWAP implies CONFIG_BLOCK this will allow to drop some
ifdefs in blk_types.h.
Instead we'll need to add a few explicit includes that were implicit
before, though.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 3a6aebc23001..bfee1af1f54f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -11,7 +11,6 @@ #include <linux/fs.h> #include <linux/atomic.h> #include <linux/page-flags.h> -#include <linux/blk_types.h> #include <asm/page.h> struct notifier_block; @@ -352,6 +351,9 @@ extern int kswapd_run(int nid); extern void kswapd_stop(int nid); #ifdef CONFIG_SWAP + +#include <linux/blk_types.h> /* for bio_end_io_t */ + /* linux/mm/page_io.c */ extern int swap_readpage(struct page *); extern int swap_writepage(struct page *page, struct writeback_control *wbc); |