]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: fix up mismerge in libxfs_iflush_int
authorEric Sandeen <sandeen@redhat.com>
Mon, 29 Feb 2016 05:03:06 +0000 (16:03 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 29 Feb 2016 05:03:06 +0000 (16:03 +1100)
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@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/util.c

index 576f9543d8bf1c1be547d58ed7ecbf2ab28c98c0..f3b9895438f9e65bf4b7b030c2dc8a678d7bc4f2 100644 (file)
@@ -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) );