]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: remove unnecessary hascrc test in btree verifiers
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 10 Jan 2017 02:16:33 +0000 (20:16 -0600)
committerEric Sandeen <sandeen@redhat.com>
Tue, 10 Jan 2017 02:16:33 +0000 (20:16 -0600)
xfs_btree_sblock_v5hdr_verify already checks _hascrc, so we can
remove it from the verifier functions.  For whatever reason this
change made it into the kernel but not xfsprogs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc_btree.c
libxfs/xfs_ialloc_btree.c

index f993b87de873d3d254b1e01674bca85a462e636c..ff4bae4206872392b4e308c89fcd271ea0c3c824 100644 (file)
@@ -278,8 +278,6 @@ xfs_allocbt_verify(
        level = be16_to_cpu(block->bb_level);
        switch (block->bb_magic) {
        case cpu_to_be32(XFS_ABTB_CRC_MAGIC):
-               if (!xfs_sb_version_hascrc(&mp->m_sb))
-                       return false;
                if (!xfs_btree_sblock_v5hdr_verify(bp))
                        return false;
                /* fall through */
@@ -291,8 +289,6 @@ xfs_allocbt_verify(
                        return false;
                break;
        case cpu_to_be32(XFS_ABTC_CRC_MAGIC):
-               if (!xfs_sb_version_hascrc(&mp->m_sb))
-                       return false;
                if (!xfs_btree_sblock_v5hdr_verify(bp))
                        return false;
                /* fall through */
index 8ccabcc3c209fbc82c27d9229a9d6f5dd7b1fb66..7bf6040ccee578e8923110de6128d99603fa7c4c 100644 (file)
@@ -225,8 +225,6 @@ xfs_inobt_verify(
        switch (block->bb_magic) {
        case cpu_to_be32(XFS_IBT_CRC_MAGIC):
        case cpu_to_be32(XFS_FIBT_CRC_MAGIC):
-               if (!xfs_sb_version_hascrc(&mp->m_sb))
-                       return false;
                if (!xfs_btree_sblock_v5hdr_verify(bp))
                        return false;
                /* fall through */