Skip to content

Commit c97ab27

Browse files
Christoph Hellwigaxboe
authored andcommitted
blk-cgroup: remove unneeded includes from <linux/blk-cgroup.h>
Remove all the includes that aren't actually needed from <linux/blk-cgroup.h> and push them to the actual source files where needed. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20220420042723.1010598-12-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 7f20ba7 commit c97ab27

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

block/blk-cgroup.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616

1717
#include <linux/blk-cgroup.h>
18+
#include <linux/cgroup.h>
19+
#include <linux/kthread.h>
1820
#include <linux/blk-mq.h>
1921

2022
struct blkcg_gq;

include/linux/blk-cgroup.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,11 @@
1414
* Nauman Rafique <nauman@google.com>
1515
*/
1616

17-
#include <linux/cgroup.h>
18-
#include <linux/percpu.h>
19-
#include <linux/percpu_counter.h>
20-
#include <linux/u64_stats_sync.h>
21-
#include <linux/seq_file.h>
22-
#include <linux/radix-tree.h>
23-
#include <linux/blkdev.h>
24-
#include <linux/atomic.h>
25-
#include <linux/kthread.h>
26-
#include <linux/fs.h>
17+
#include <linux/types.h>
18+
19+
struct bio;
20+
struct cgroup_subsys_state;
21+
struct request_queue;
2722

2823
#define FC_APPID_LEN 129
2924

mm/backing-dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22

3+
#include <linux/blkdev.h>
34
#include <linux/wait.h>
45
#include <linux/rbtree.h>
56
#include <linux/kthread.h>

mm/readahead.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
* ->readpage() which may be less efficient.
114114
*/
115115

116+
#include <linux/blkdev.h>
116117
#include <linux/kernel.h>
117118
#include <linux/dax.h>
118119
#include <linux/gfp.h>

mm/swapfile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Swap reorganised 29.12.95, Stephen Tweedie
77
*/
88

9+
#include <linux/blkdev.h>
910
#include <linux/mm.h>
1011
#include <linux/sched/mm.h>
1112
#include <linux/sched/task.h>

0 commit comments

Comments
 (0)