include: remove pagemap.h from blkdev.h
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 7 May 2021 01:02:27 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 May 2021 02:24:11 +0000 (19:24 -0700)
My UEK-derived config has 1030 files depending on pagemap.h before this
change.  Afterwards, just 326 files need to be rebuilt when I touch
pagemap.h.  I think blkdev.h is probably included too widely, but
untangling that dependency is harder and this solves my problem.  x86
allmodconfig builds, but there may be implicit include problems on other
architectures.

Link: https://lkml.kernel.org/r/20210309195747.283796-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Dan Williams <dan.j.williams@intel.com> [nvdimm]
Acked-by: Jens Axboe <axboe@kernel.dk> [block]
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Coly Li <colyli@suse.de> [bcache]
Acked-by: Martin K. Petersen <martin.petersen@oracle.com> [scsi]
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
block/blk-settings.c
drivers/block/brd.c
drivers/block/loop.c
drivers/md/bcache/super.c
drivers/nvdimm/btt.c
drivers/nvdimm/pmem.c
drivers/scsi/scsicam.c
include/linux/blkdev.h
include/linux/swap.h

index 9c009090c4b5bf58168564cf62e8d7b08011d08e..902c40d67120251564b1c17529f0557cea76d872 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/init.h>
 #include <linux/bio.h>
 #include <linux/blkdev.h>
+#include <linux/pagemap.h>
 #include <linux/gcd.h>
 #include <linux/lcm.h>
 #include <linux/jiffies.h>
index 6e622c1327eec71a752a6afc6d5ca3c985a31518..7562cf30b14e09d0727172911a1573d0c57b2221 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/bio.h>
 #include <linux/highmem.h>
 #include <linux/mutex.h>
+#include <linux/pagemap.h>
 #include <linux/radix-tree.h>
 #include <linux/fs.h>
 #include <linux/slab.h>
index a370cde3ddd49ad7e8c8d005279f904fa793bb57..d58d68f3c7cd04014511cebd878c8db821510577 100644 (file)
@@ -53,6 +53,7 @@
 #include <linux/moduleparam.h>
 #include <linux/sched.h>
 #include <linux/fs.h>
+#include <linux/pagemap.h>
 #include <linux/file.h>
 #include <linux/stat.h>
 #include <linux/errno.h>
index 2b6d6e9cd6800f5e5222c3bc3f9efdb64392b7d2..bea8c4429ae8f47798fa8e30a2947bbe15b25611 100644 (file)
@@ -16,6 +16,7 @@
 #include "features.h"
 
 #include <linux/blkdev.h>
+#include <linux/pagemap.h>
 #include <linux/debugfs.h>
 #include <linux/genhd.h>
 #include <linux/idr.h>
index 41aa1f01fc0752850c752bbca95a49aade0f2320..18a267d5073f98fc4f47257702b09c46e353be2c 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/highmem.h>
 #include <linux/debugfs.h>
 #include <linux/blkdev.h>
+#include <linux/pagemap.h>
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/mutex.h>
index 7daac795db393cb4669144c2ed9bcb7faab6b39e..ed10a8b66068ae65795e50334f21bf9d8ecf22e6 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <linux/blkdev.h>
+#include <linux/pagemap.h>
 #include <linux/hdreg.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
index f1553a453616fdc41fbdd806dcda72efbd7bc9c2..0ffdb8f2995f7a9dc59d14f912ce1dafd94fcc3e 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/genhd.h>
 #include <linux/kernel.h>
 #include <linux/blkdev.h>
+#include <linux/pagemap.h>
 #include <linux/msdos_partition.h>
 #include <asm/unaligned.h>
 
index b91ba6207365b2af4081b67193d13b820da4ba98..1255823b2bc0fff0dcb75535333f809bc886d9c4 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/minmax.h>
 #include <linux/timer.h>
 #include <linux/workqueue.h>
-#include <linux/pagemap.h>
 #include <linux/backing-dev-defs.h>
 #include <linux/wait.h>
 #include <linux/mempool.h>
index f69e0f67651dfd4f7040ba48de39ecd5c797a96e..144727041e78b3b1e377a85d85dcd8e194dd3f15 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/sched.h>
 #include <linux/node.h>
 #include <linux/fs.h>
+#include <linux/pagemap.h>
 #include <linux/atomic.h>
 #include <linux/page-flags.h>
 #include <uapi/linux/mempolicy.h>