]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: fix attribute leaf output for ATTR3 format
authorDave Chinner <dchinner@redhat.com>
Wed, 19 Feb 2014 00:52:25 +0000 (11:52 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 19 Feb 2014 00:52:25 +0000 (11:52 +1100)
attr3_leaf_entries_count() checks against the wrong magic number.
hence returns zero for an entry count when it should be returning a
value. Fixing this makes xfs/021 pass on CRC enabled filesystems.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/attr.c

index 740d5649755ba203c4bf55ed8342fa85fc82c48b..caa154e171c58158afb027be043ecd5c09c58afe 100644 (file)
--- a/db/attr.c
+++ b/db/attr.c
@@ -170,7 +170,7 @@ attr3_leaf_entries_count(
        struct xfs_attr3_leafblock *leaf = obj;
 
        ASSERT(startoff == 0);
-       if (be16_to_cpu(leaf->hdr.info.hdr.magic) != XFS_ATTR_LEAF_MAGIC)
+       if (be16_to_cpu(leaf->hdr.info.hdr.magic) != XFS_ATTR3_LEAF_MAGIC)
                return 0;
        return be16_to_cpu(leaf->hdr.count);
 }