mm: only include blk_types in swap.h if CONFIG_SWAP is enabled
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Nov 2016 13:40:16 +0000 (07:40 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 1 Nov 2016 15:43:26 +0000 (09:43 -0600)
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>
drivers/staging/lustre/include/linux/lnet/types.h
drivers/staging/lustre/lustre/llite/rw.c
fs/ntfs/aops.c
fs/ntfs/mft.c
fs/reiserfs/inode.c
fs/splice.c
include/linux/swap.h

index f8be0e2f7bf7f72e40a5258b9c5745afc1273eca..8ca1e9d0cfe2b4f539e0ce981476dc80cf15c88c 100644 (file)
@@ -34,6 +34,7 @@
 #define __LNET_TYPES_H__
 
 #include <linux/types.h>
+#include <linux/bvec.h>
 
 /** \addtogroup lnet
  * @{
index 50c0152ba0224d5d8be2e9f0f4696b11054bb0d1..76a6836cdf70ca633124fb5c29aedb34a7748bbc 100644 (file)
@@ -47,6 +47,7 @@
 #include <linux/pagemap.h>
 /* current_is_kswapd() */
 #include <linux/swap.h>
+#include <linux/bvec.h>
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
index fe251f187ff8ff2a4f88210517470a1c2a0426f8..d0cf6fee5c77fe0aa6c04046731bab12ed649be5 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/buffer_head.h>
 #include <linux/writeback.h>
 #include <linux/bit_spinlock.h>
+#include <linux/bio.h>
 
 #include "aops.h"
 #include "attrib.h"
index d3c009626032fef599c13e6af37807ebb28ddd76..b6f402194f02c233db4034dffff98ce3de8b751f 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/buffer_head.h>
 #include <linux/slab.h>
 #include <linux/swap.h>
+#include <linux/bio.h>
 
 #include "attrib.h"
 #include "aops.h"
index 58b2dedb2a3a66d610683a66f3ee8a1df46311aa..cfeae9b0a2b77c3d571c35e85ee7bd20d1357ff3 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/quotaops.h>
 #include <linux/swap.h>
 #include <linux/uio.h>
+#include <linux/bio.h>
 
 int reiserfs_commit_write(struct file *f, struct page *page,
                          unsigned from, unsigned to);
index 153d4f3bd441febd7004b1862cd218afc0ee6252..51492f26915afbf0e7ecd5952a194b2c7d9ff4a6 100644 (file)
@@ -17,6 +17,7 @@
  * Copyright (C) 2006 Ingo Molnar <mingo@elte.hu>
  *
  */
+#include <linux/bvec.h>
 #include <linux/fs.h>
 #include <linux/file.h>
 #include <linux/pagemap.h>
index 3a6aebc230015b3520f33b414eb1c1fed33526dd..bfee1af1f54f0f57967182ca557ce5da064823a0 100644 (file)
@@ -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);