summaryrefslogtreecommitdiff
path: root/include/linux/backing-dev.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-05-23 00:13:53 +0300
committerJens Axboe <axboe@fb.com>2015-06-02 17:33:36 +0300
commitbc05873dccd27d75d6acdf812c3edfb181f1ba17 (patch)
treee281a65c0688c6d4987ea621263dc69d99d51bd2 /include/linux/backing-dev.h
parenta06fd6b102286e3b727ed42b8fb37825fa7127a2 (diff)
downloadlinux-bc05873dccd27d75d6acdf812c3edfb181f1ba17.tar.xz
writeback: make writeback_in_progress() take bdi_writeback instead of backing_dev_info
writeback_in_progress() currently takes @bdi and returns whether writeback is in progress on its root wb (bdi_writeback). In preparation for cgroup writeback support, make it take wb instead. While at it, make it an inline function. This patch doesn't make any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r--include/linux/backing-dev.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 0ff40c228bee..f04956c900ec 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -156,7 +156,17 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio);
extern struct backing_dev_info noop_backing_dev_info;
-int writeback_in_progress(struct backing_dev_info *bdi);
+/**
+ * writeback_in_progress - determine whether there is writeback in progress
+ * @wb: bdi_writeback of interest
+ *
+ * Determine whether there is writeback waiting to be handled against a
+ * bdi_writeback.
+ */
+static inline bool writeback_in_progress(struct bdi_writeback *wb)
+{
+ return test_bit(WB_writeback_running, &wb->state);
+}
static inline struct backing_dev_info *inode_to_bdi(struct inode *inode)
{