summaryrefslogtreecommitdiff
path: root/include/linux/backing-dev.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-05-22 17:13:35 -0400
committerJens Axboe <axboe@fb.com>2015-06-02 08:33:35 -0600
commit4aa9c692e052cf6db99db62a8fe0543e5c455da7 (patch)
tree378d5b44e7ec769dd4dfc9ac5ab2447fdb1f50a4 /include/linux/backing-dev.h
parent8395cd9f813d5d7ed9870e642230acfcfc1e8a0a (diff)
bdi: separate out congested state into a separate struct
Currently, a wb's (bdi_writeback) congestion state is carried in its ->state field; however, cgroup writeback support will require multiple wb's sharing the same congestion state. This patch separates out congestion state into its own struct - struct bdi_writeback_congested. A new field wb field, wb_congested, points to its associated congested struct. The default wb, bdi->wb, always points to bdi->wb_congested. While this patch adds a layer of indirection, it doesn't introduce any behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r--include/linux/backing-dev.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 785782034e86..bfdaa18ba0a1 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -167,7 +167,7 @@ static inline int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
{
if (bdi->congested_fn)
return bdi->congested_fn(bdi->congested_data, bdi_bits);
- return (bdi->wb.state & bdi_bits);
+ return (bdi->wb.congested->state & bdi_bits);
}
static inline int bdi_read_congested(struct backing_dev_info *bdi)