]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
writeback: explain why @inode is allowed to be NULL for inode_congested()
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:54:54 +0000 (14:54 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:15 +0000 (15:49 -0700)
Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/fs-writeback.c

index 38e1035064845a29072b65f0fcf125a904f75c43..128404310fc0baa4647b486e5efe0e4f7ba74ffe 100644 (file)
@@ -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)
 {