Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>

blk-cgroup.h pulls in blkdev.h and thus pretty much all the block
headers. Break this dependency chain by turning wbc_blkcg_css into a
macro and dropping the blk-cgroup.h include.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20210920123328.1399408-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
348332e0 3c08b093

+9 -9
+1
drivers/gpu/drm/i915/i915_utils.h
··· 30 30 #include <linux/sched.h> 31 31 #include <linux/types.h> 32 32 #include <linux/workqueue.h> 33 + #include <linux/sched/clock.h> 33 34 34 35 struct drm_i915_private; 35 36 struct timer_list;
+1
fs/btrfs/inode.c
··· 6 6 #include <crypto/hash.h> 7 7 #include <linux/kernel.h> 8 8 #include <linux/bio.h> 9 + #include <linux/blk-cgroup.h> 9 10 #include <linux/file.h> 10 11 #include <linux/fs.h> 11 12 #include <linux/pagemap.h>
+1
fs/quota/quota.c
··· 10 10 #include <linux/namei.h> 11 11 #include <linux/slab.h> 12 12 #include <asm/current.h> 13 + #include <linux/blkdev.h> 13 14 #include <linux/uaccess.h> 14 15 #include <linux/kernel.h> 15 16 #include <linux/security.h>
+5 -9
include/linux/writeback.h
··· 11 11 #include <linux/flex_proportions.h> 12 12 #include <linux/backing-dev-defs.h> 13 13 #include <linux/blk_types.h> 14 - #include <linux/blk-cgroup.h> 15 14 16 15 struct bio; 17 16 ··· 108 109 return flags; 109 110 } 110 111 111 - static inline struct cgroup_subsys_state * 112 - wbc_blkcg_css(struct writeback_control *wbc) 113 - { 114 112 #ifdef CONFIG_CGROUP_WRITEBACK 115 - if (wbc->wb) 116 - return wbc->wb->blkcg_css; 117 - #endif 118 - return blkcg_root_css; 119 - } 113 + #define wbc_blkcg_css(wbc) \ 114 + ((wbc)->wb ? (wbc)->wb->blkcg_css : blkcg_root_css) 115 + #else 116 + #define wbc_blkcg_css(wbc) (blkcg_root_css) 117 + #endif /* CONFIG_CGROUP_WRITEBACK */ 120 118 121 119 /* 122 120 * A wb_domain represents a domain that wb's (bdi_writeback's) belong to
+1
lib/random32.c
··· 39 39 #include <linux/random.h> 40 40 #include <linux/sched.h> 41 41 #include <linux/bitops.h> 42 + #include <linux/slab.h> 42 43 #include <asm/unaligned.h> 43 44 #include <trace/events/random.h> 44 45