]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs: remove the crc variable in __xfs_btree_check_lblock
authorChristoph Hellwig <hch@lst.de>
Mon, 22 Apr 2024 17:01:07 +0000 (10:01 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:39 +0000 (11:37 -0700)
Source kernel commit: bd45019d9aa942d1c2457d96a7dbf2ad3051754b

crc is only used once, just use the xfs_has_crc check directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_btree.c

index 359125a21b18670dbc5d02ff68411c5cb5c9ed7c..0b5002540b503b04ccdadfecddeacecaa92af822 100644 (file)
@@ -103,11 +103,10 @@ __xfs_btree_check_lblock(
        struct xfs_buf          *bp)
 {
        struct xfs_mount        *mp = cur->bc_mp;
-       bool                    crc = xfs_has_crc(mp);
        xfs_failaddr_t          fa;
        xfs_fsblock_t           fsb = NULLFSBLOCK;
 
-       if (crc) {
+       if (xfs_has_crc(mp)) {
                if (!uuid_equal(&block->bb_u.l.bb_uuid, &mp->m_sb.sb_meta_uuid))
                        return __this_address;
                if (block->bb_u.l.bb_blkno !=