Commit 348332e0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20210920123328.1399408-2-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3c08b093
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/sched/clock.h>
struct drm_i915_private; struct drm_i915_private;
struct timer_list; struct timer_list;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <crypto/hash.h> #include <crypto/hash.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/bio.h> #include <linux/bio.h>
#include <linux/blk-cgroup.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/namei.h> #include <linux/namei.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/current.h> #include <asm/current.h>
#include <linux/blkdev.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/security.h> #include <linux/security.h>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <linux/flex_proportions.h> #include <linux/flex_proportions.h>
#include <linux/backing-dev-defs.h> #include <linux/backing-dev-defs.h>
#include <linux/blk_types.h> #include <linux/blk_types.h>
#include <linux/blk-cgroup.h>
struct bio; struct bio;
...@@ -109,15 +108,12 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc) ...@@ -109,15 +108,12 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc)
return flags; return flags;
} }
static inline struct cgroup_subsys_state *
wbc_blkcg_css(struct writeback_control *wbc)
{
#ifdef CONFIG_CGROUP_WRITEBACK #ifdef CONFIG_CGROUP_WRITEBACK
if (wbc->wb) #define wbc_blkcg_css(wbc) \
return wbc->wb->blkcg_css; ((wbc)->wb ? (wbc)->wb->blkcg_css : blkcg_root_css)
#endif #else
return blkcg_root_css; #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 * A wb_domain represents a domain that wb's (bdi_writeback's) belong to
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/random.h> #include <linux/random.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/slab.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <trace/events/random.h> #include <trace/events/random.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment