]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm: don't include <linux/blk-cgroup.h> in <linux/writeback.h>
authorChristoph Hellwig <hch@lst.de>
Mon, 20 Sep 2021 12:33:12 +0000 (14:33 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 12:17:01 +0000 (06:17 -0600)
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>
drivers/gpu/drm/i915/i915_utils.h
fs/btrfs/inode.c
fs/quota/quota.c
include/linux/writeback.h
lib/random32.c

index 5259edacde380c10b32bc204cb38a084979ad514..066a9118c3748e2df28a57d7e44577fa7116d820 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/workqueue.h>
+#include <linux/sched/clock.h>
 
 struct drm_i915_private;
 struct timer_list;
index 487533c35ddb6bc6b69d0292969679850438c906..4a9077c5244480db38d80e2298a8f4c1ad4137ef 100644 (file)
@@ -6,6 +6,7 @@
 #include <crypto/hash.h>
 #include <linux/kernel.h>
 #include <linux/bio.h>
+#include <linux/blk-cgroup.h>
 #include <linux/file.h>
 #include <linux/fs.h>
 #include <linux/pagemap.h>
index 2bcc9a6f1bfc0dc5af05c6c6f81608664a09aca5..052f143e2e0e11b7dbd85e4644c810d0cf3cf94f 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/namei.h>
 #include <linux/slab.h>
 #include <asm/current.h>
+#include <linux/blkdev.h>
 #include <linux/uaccess.h>
 #include <linux/kernel.h>
 #include <linux/security.h>
index d1f65adf6a2666388db5b7f370b15595a3930c41..8eb165760752b40d625cebff57ba18e45b8e72c6 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/flex_proportions.h>
 #include <linux/backing-dev-defs.h>
 #include <linux/blk_types.h>
-#include <linux/blk-cgroup.h>
 
 struct bio;
 
@@ -109,15 +108,12 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc)
        return flags;
 }
 
-static inline struct cgroup_subsys_state *
-wbc_blkcg_css(struct writeback_control *wbc)
-{
 #ifdef CONFIG_CGROUP_WRITEBACK
-       if (wbc->wb)
-               return wbc->wb->blkcg_css;
-#endif
-       return blkcg_root_css;
-}
+#define wbc_blkcg_css(wbc) \
+       ((wbc)->wb ? (wbc)->wb->blkcg_css : blkcg_root_css)
+#else
+#define wbc_blkcg_css(wbc)             (blkcg_root_css)
+#endif /* CONFIG_CGROUP_WRITEBACK */
 
 /*
  * A wb_domain represents a domain that wb's (bdi_writeback's) belong to
index 4d0e05e471d72979dbce4ae7ea562f740914e6eb..a57a0e18819d0d6f7db5e48fdfb10830d50b0486 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/random.h>
 #include <linux/sched.h>
 #include <linux/bitops.h>
+#include <linux/slab.h>
 #include <asm/unaligned.h>
 #include <trace/events/random.h>