diff options
author | Christoph Hellwig <hch@lst.de> | 2016-11-01 09:40:16 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-01 11:43:26 -0400 |
commit | be297968da22cf40c9c419df51e71ba8856a2ec2 (patch) | |
tree | 2aff842b99f54ff0c920f6fca1d53c531975240e | |
parent | 9f08217120568afdfb59973a89a675e649c0096d (diff) |
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>
-rw-r--r-- | drivers/staging/lustre/include/linux/lnet/types.h | 1 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/rw.c | 1 | ||||
-rw-r--r-- | fs/ntfs/aops.c | 1 | ||||
-rw-r--r-- | fs/ntfs/mft.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/inode.c | 1 | ||||
-rw-r--r-- | fs/splice.c | 1 | ||||
-rw-r--r-- | include/linux/swap.h | 4 |
7 files changed, 9 insertions, 1 deletions
diff --git a/drivers/staging/lustre/include/linux/lnet/types.h b/drivers/staging/lustre/include/linux/lnet/types.h index f8be0e2f7bf7..8ca1e9d0cfe2 100644 --- a/drivers/staging/lustre/include/linux/lnet/types.h +++ b/drivers/staging/lustre/include/linux/lnet/types.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define __LNET_TYPES_H__ | 34 | #define __LNET_TYPES_H__ |
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/bvec.h> | ||
37 | 38 | ||
38 | /** \addtogroup lnet | 39 | /** \addtogroup lnet |
39 | * @{ | 40 | * @{ |
diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c index 50c0152ba022..76a6836cdf70 100644 --- a/drivers/staging/lustre/lustre/llite/rw.c +++ b/drivers/staging/lustre/lustre/llite/rw.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/pagemap.h> | 47 | #include <linux/pagemap.h> |
48 | /* current_is_kswapd() */ | 48 | /* current_is_kswapd() */ |
49 | #include <linux/swap.h> | 49 | #include <linux/swap.h> |
50 | #include <linux/bvec.h> | ||
50 | 51 | ||
51 | #define DEBUG_SUBSYSTEM S_LLITE | 52 | #define DEBUG_SUBSYSTEM S_LLITE |
52 | 53 | ||
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index fe251f187ff8..d0cf6fee5c77 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/buffer_head.h> | 29 | #include <linux/buffer_head.h> |
30 | #include <linux/writeback.h> | 30 | #include <linux/writeback.h> |
31 | #include <linux/bit_spinlock.h> | 31 | #include <linux/bit_spinlock.h> |
32 | #include <linux/bio.h> | ||
32 | 33 | ||
33 | #include "aops.h" | 34 | #include "aops.h" |
34 | #include "attrib.h" | 35 | #include "attrib.h" |
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index d3c009626032..b6f402194f02 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/buffer_head.h> | 23 | #include <linux/buffer_head.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/swap.h> | 25 | #include <linux/swap.h> |
26 | #include <linux/bio.h> | ||
26 | 27 | ||
27 | #include "attrib.h" | 28 | #include "attrib.h" |
28 | #include "aops.h" | 29 | #include "aops.h" |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 58b2dedb2a3a..cfeae9b0a2b7 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/quotaops.h> | 19 | #include <linux/quotaops.h> |
20 | #include <linux/swap.h> | 20 | #include <linux/swap.h> |
21 | #include <linux/uio.h> | 21 | #include <linux/uio.h> |
22 | #include <linux/bio.h> | ||
22 | 23 | ||
23 | int reiserfs_commit_write(struct file *f, struct page *page, | 24 | int reiserfs_commit_write(struct file *f, struct page *page, |
24 | unsigned from, unsigned to); | 25 | unsigned from, unsigned to); |
diff --git a/fs/splice.c b/fs/splice.c index 153d4f3bd441..51492f26915a 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * Copyright (C) 2006 Ingo Molnar <mingo@elte.hu> | 17 | * Copyright (C) 2006 Ingo Molnar <mingo@elte.hu> |
18 | * | 18 | * |
19 | */ | 19 | */ |
20 | #include <linux/bvec.h> | ||
20 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
21 | #include <linux/file.h> | 22 | #include <linux/file.h> |
22 | #include <linux/pagemap.h> | 23 | #include <linux/pagemap.h> |
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 @@ | |||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #include <linux/page-flags.h> | 13 | #include <linux/page-flags.h> |
14 | #include <linux/blk_types.h> | ||
15 | #include <asm/page.h> | 14 | #include <asm/page.h> |
16 | 15 | ||
17 | struct notifier_block; | 16 | struct notifier_block; |
@@ -352,6 +351,9 @@ extern int kswapd_run(int nid); | |||
352 | extern void kswapd_stop(int nid); | 351 | extern void kswapd_stop(int nid); |
353 | 352 | ||
354 | #ifdef CONFIG_SWAP | 353 | #ifdef CONFIG_SWAP |
354 | |||
355 | #include <linux/blk_types.h> /* for bio_end_io_t */ | ||
356 | |||
355 | /* linux/mm/page_io.c */ | 357 | /* linux/mm/page_io.c */ |
356 | extern int swap_readpage(struct page *); | 358 | extern int swap_readpage(struct page *); |
357 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 359 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |