summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-08-18 23:54:54 +0200
committerJens Axboe <axboe@fb.com>2015-08-19 00:49:15 +0200
commit60292bcc1b240a6708aa531c8ece1da2a78d560a (patch)
tree157569f5e11606542823dae9480e0a915e9a4e2d
parentwriteback: remove wb_writeback_work->single_wait/done (diff)
downloadlinux-60292bcc1b240a6708aa531c8ece1da2a78d560a.tar.xz
linux-60292bcc1b240a6708aa531c8ece1da2a78d560a.zip
writeback: explain why @inode is allowed to be NULL for inode_congested()
Signed-off-by: Tejun Heo <tj@kernel.org> Suggested-by: Jan Kara <jack@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--fs/fs-writeback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 38e103506484..128404310fc0 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -701,7 +701,7 @@ EXPORT_SYMBOL_GPL(wbc_account_io);
/**
* inode_congested - test whether an inode is congested
- * @inode: inode to test for congestion
+ * @inode: inode to test for congestion (may be NULL)
* @cong_bits: mask of WB_[a]sync_congested bits to test
*
* Tests whether @inode is congested. @cong_bits is the mask of congestion
@@ -711,6 +711,9 @@ EXPORT_SYMBOL_GPL(wbc_account_io);
* determined by whether the cgwb (cgroup bdi_writeback) for the blkcg
* associated with @inode is congested; otherwise, the root wb's congestion
* state is used.
+ *
+ * @inode is allowed to be NULL as this function is often called on
+ * mapping->host which is NULL for the swapper space.
*/
int inode_congested(struct inode *inode, int cong_bits)
{