Blob Blame History Raw
From: Christoph Hellwig <hch@lst.de>
Date: Tue, 23 Nov 2021 19:53:12 +0100
Subject: [PATCH] block: don't include <linux/part_stat.h> in blk.h
Git-commit: 82d981d4230bc0a19540fc540d4bdf49a3769f05
Patch-mainline: v5.17-rc1
References: jsc#PED-1183

Not needed, shift it into the source files that need it instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211123185312.1432157-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Hannes Reinecke <hare@suse.com>
---
 block/blk-cgroup.c | 1 +
 block/blk-core.c   | 1 +
 block/blk-flush.c  | 1 +
 block/blk-merge.c  | 1 +
 block/blk-mq.c     | 1 +
 block/blk.h        | 1 -
 block/genhd.c      | 1 +
 7 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 663aabfeba18..650f7e27989f 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -30,6 +30,7 @@
 #include <linux/blk-cgroup.h>
 #include <linux/tracehook.h>
 #include <linux/psi.h>
+#include <linux/part_stat.h>
 #include "blk.h"
 #include "blk-ioprio.h"
 #include "blk-throttle.h"
diff --git a/block/blk-core.c b/block/blk-core.c
index 1acd94ba10c7..b0660c9df852 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -39,6 +39,7 @@
 #include <linux/debugfs.h>
 #include <linux/bpf.h>
 #include <linux/psi.h>
+#include <linux/part_stat.h>
 #include <linux/sched/sysctl.h>
 #include <linux/blk-crypto.h>
 
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 86ee50455e41..902e80e48e4a 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -69,6 +69,7 @@
 #include <linux/blkdev.h>
 #include <linux/gfp.h>
 #include <linux/blk-mq.h>
+#include <linux/part_stat.h>
 
 #include "blk.h"
 #include "blk-mq.h"
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 456fb88c49b1..e07f5a1ae86e 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -8,6 +8,7 @@
 #include <linux/blkdev.h>
 #include <linux/blk-integrity.h>
 #include <linux/scatterlist.h>
+#include <linux/part_stat.h>
 
 #include <trace/events/block.h>
 
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4dff401bc642..4bdc3bc54ea3 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -28,6 +28,7 @@
 #include <linux/crash_dump.h>
 #include <linux/prefetch.h>
 #include <linux/blk-crypto.h>
+#include <linux/part_stat.h>
 
 #include <trace/events/block.h>
 
diff --git a/block/blk.h b/block/blk.h
index 4089aeffca4b..a57c84654d0a 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -2,7 +2,6 @@
 #ifndef BLK_INTERNAL_H
 #define BLK_INTERNAL_H
 
-#include <linux/part_stat.h>
 #include <linux/blk-crypto.h>
 #include <linux/memblock.h>	/* for max_pfn/max_low_pfn */
 #include <xen/xen.h>
diff --git a/block/genhd.c b/block/genhd.c
index 01606db8c625..5179a4f00fba 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -25,6 +25,7 @@
 #include <linux/log2.h>
 #include <linux/pm_runtime.h>
 #include <linux/badblocks.h>
+#include <linux/part_stat.h>
 
 #include "blk.h"
 #include "blk-mq-sched.h"
-- 
2.35.3