xfs
[Top] [All Lists]

Re: [patch] xfs: extra semi-colon breaks a condition

To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Subject: Re: [patch] xfs: extra semi-colon breaks a condition
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Fri, 28 Mar 2014 08:09:18 -0400
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, kernel-janitors@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140328080313.GA25192@mwanda>
References: <20140328080313.GA25192@mwanda>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Mar 28, 2014 at 11:03:13AM +0300, Dan Carpenter wrote:
> There were some extra semi-colons here which mean that we return true
> unintentionally.
> 
> Fixes: a49935f200e2 ('xfs: xfs_check_page_type buffer checks need help')
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
> index 98016b3..75df77d 100644
> --- a/fs/xfs/xfs_aops.c
> +++ b/fs/xfs/xfs_aops.c
> @@ -659,10 +659,10 @@ xfs_check_page_type(
>                       if (type == XFS_IO_UNWRITTEN)
>                               return true;
>               } else if (buffer_delay(bh)) {
> -                     if (type == XFS_IO_DELALLOC);
> +                     if (type == XFS_IO_DELALLOC)
>                               return true;
>               } else if (buffer_dirty(bh) && buffer_mapped(bh)) {
> -                     if (type == XFS_IO_OVERWRITE);
> +                     if (type == XFS_IO_OVERWRITE)
>                               return true;
>               }
>  

Nice catch.

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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