diff mbox

[block/for-4.3] writeback: explain why @inode is allowed to be NULL for inode_congested()

Message ID 20150704151200.GA13251@mtj.duckdns.org (mailing list archive)
State New, archived
Headers show

Commit Message

Tejun Heo July 4, 2015, 3:12 p.m. UTC
Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Jan Kara <jack@suse.cz>
---
Hello,

So, something like this.  I'll resend this patch as part of a patch
series once -rc1 drops.

Thanks.

 fs/fs-writeback.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jan Kara July 8, 2015, 8:12 a.m. UTC | #1
On Sat 04-07-15 11:12:00, Tejun Heo wrote:
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Suggested-by: Jan Kara <jack@suse.cz>
> ---
> Hello,
> 
> So, something like this.  I'll resend this patch as part of a patch
> series once -rc1 drops.
  Looks good. Thanks!

								Honza

>  fs/fs-writeback.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -700,7 +700,7 @@ void wbc_account_io(struct writeback_con
>  
>  /**
>   * 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
> @@ -710,6 +710,9 @@ void wbc_account_io(struct writeback_con
>   * 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)
>  {
diff mbox

Patch

--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -700,7 +700,7 @@  void wbc_account_io(struct writeback_con
 
 /**
  * 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
@@ -710,6 +710,9 @@  void wbc_account_io(struct writeback_con
  * 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)
 {