xfs
[Top] [All Lists]

Re: [PATCH] libxfs: fix up mismerge in libxfs_iflush_int

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] libxfs: fix up mismerge in libxfs_iflush_int
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 18 Feb 2016 16:58:51 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <56C62FC1.60205@xxxxxxxxxx>
References: <56C62FC1.60205@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
Oh, if you think of it, you can note that this
is coverity ID 1353345 in the changelog as well;
not sure we care too much about that, but *shrug*

-Eric

On 2/18/16 2:55 PM, Eric Sandeen wrote:
> XFS_ISDIR is a bool, don't compare it to S_IFDIR
> 
> e37bf5 xfs: mode di_mode to vfs inode had a small mis-merge
> from kernelspace, when moving from
> 
>       if ((ip->i_d.di_mode & S_IFMT) == S_IFDIR) 
> to
>       if (XFS_ISDIR(ip) == S_IFDIR
> 
> that "==" should have been dropped.
> 
> Signed-off-by: ERic Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> diff --git a/libxfs/util.c b/libxfs/util.c
> index 576f954..f3b9895 100644
> --- a/libxfs/util.c
> +++ b/libxfs/util.c
> @@ -420,7 +420,7 @@ libxfs_iflush_int(xfs_inode_t *ip, xfs_buf_t *bp)
>       if (XFS_ISREG(ip)) {
>               ASSERT( (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS) ||
>                       (ip->i_d.di_format == XFS_DINODE_FMT_BTREE) );
> -     } else if (XFS_ISDIR(ip) == S_IFDIR) {
> +     } else if (XFS_ISDIR(ip)) {
>               ASSERT( (ip->i_d.di_format == XFS_DINODE_FMT_EXTENTS) ||
>                       (ip->i_d.di_format == XFS_DINODE_FMT_BTREE)   ||
>                       (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL) );
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

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