aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-08 08:36:05 -0400
committerChristoph Hellwig <hch@lst.de>2011-07-08 08:36:05 -0400
commit69ef921b55cc3788d1d2a27b33b27d04acd0090a (patch)
treebcc7c1f4b7f15628f122dfdb96f8d4d37f587e92 /fs/xfs/xfs_bmap.c
parent218106a1104c598011e5df9d9aac7e0416be03e6 (diff)
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>
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r--fs/xfs/xfs_bmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 7b46b78ba3f0..2ce6aa644e7e 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -4083,7 +4083,7 @@ xfs_bmap_sanity_check(
4083{ 4083{
4084 struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); 4084 struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
4085 4085
4086 if (be32_to_cpu(block->bb_magic) != XFS_BMAP_MAGIC || 4086 if (block->bb_magic != cpu_to_be32(XFS_BMAP_MAGIC) ||
4087 be16_to_cpu(block->bb_level) != level || 4087 be16_to_cpu(block->bb_level) != level ||
4088 be16_to_cpu(block->bb_numrecs) == 0 || 4088 be16_to_cpu(block->bb_numrecs) == 0 ||
4089 be16_to_cpu(block->bb_numrecs) > mp->m_bmap_dmxr[level != 0]) 4089 be16_to_cpu(block->bb_numrecs) > mp->m_bmap_dmxr[level != 0])