xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix implicit bool to int conversion

To: Nicholas Mc Guire <der.herr@xxxxxxx>
Subject: Re: [PATCH] xfs: fix implicit bool to int conversion
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Thu, 8 Jan 2015 09:39:13 -0500
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1420721391-22717-1-git-send-email-der.herr@xxxxxxx>
References: <1420721391-22717-1-git-send-email-der.herr@xxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Jan 08, 2015 at 01:49:51PM +0100, Nicholas Mc Guire wrote:
> try_wait_for_completion returns bool so the wrapper function
> xfs_dqflock_nowait should probably also return bool and not int. 
> 
> Signed-off-by: Nicholas Mc Guire <der.herr@xxxxxxx>
> ---

Indeed...

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

> 
> patch was only compile tested x86_64_defconfig + CONFIG_XFS_FS=m
> CONFIG_XFS_QUOTA=y
> 
> patch is against linux-next 3.19.0-rc3 -next-20150107
> 
>  fs/xfs/xfs_dquot.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_dquot.h b/fs/xfs/xfs_dquot.h
> index c24c67e..2f536f3 100644
> --- a/fs/xfs/xfs_dquot.h
> +++ b/fs/xfs/xfs_dquot.h
> @@ -86,7 +86,7 @@ static inline void xfs_dqflock(xfs_dquot_t *dqp)
>       wait_for_completion(&dqp->q_flush);
>  }
>  
> -static inline int xfs_dqflock_nowait(xfs_dquot_t *dqp)
> +static inline bool xfs_dqflock_nowait(xfs_dquot_t *dqp)
>  {
>       return try_wait_for_completion(&dqp->q_flush);
>  }
> -- 
> 1.7.10.4
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>