xfs: byteswap constants instead of variables
Micro-optimize various comparisms by always byteswapping the constant instead of the variable, which allows to do the swap at compile instead of runtime. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
@ -4083,7 +4083,7 @@ xfs_bmap_sanity_check(
|
||||
{
|
||||
struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
|
||||
|
||||
if (be32_to_cpu(block->bb_magic) != XFS_BMAP_MAGIC ||
|
||||
if (block->bb_magic != cpu_to_be32(XFS_BMAP_MAGIC) ||
|
||||
be16_to_cpu(block->bb_level) != level ||
|
||||
be16_to_cpu(block->bb_numrecs) == 0 ||
|
||||
be16_to_cpu(block->bb_numrecs) > mp->m_bmap_dmxr[level != 0])
|
||||
|
Reference in New Issue
Block a user