summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_alloc.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2019-02-07 10:45:45 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-02-11 16:07:01 -0800
commite34d3e74eb8f6eb020312cec747ff55ee1d1ca18 (patch)
tree2f30668dd9c418c55ffe64316c5da7785aa4cbe2 /fs/xfs/libxfs/xfs_alloc.c
parent75d0230314997b18946c96dc3d93c8d61cfdb9a5 (diff)
xfs: always check magic values in on-disk byte order
Most verifiers that check on-disk magic values convert the CPU endian magic value constant to disk endian to facilitate compile time optimization of the byte swap and reduce the need for runtime byte swaps in buffer verifiers. Several buffer verifiers do not follow this pattern. Update those verifiers for consistency. Also fix up a random typo in the inode readahead verifier name. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index b715668886a4..48aab07e7138 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -570,7 +570,7 @@ xfs_agfl_verify(
if (!uuid_equal(&agfl->agfl_uuid, &mp->m_sb.sb_meta_uuid))
return __this_address;
- if (be32_to_cpu(agfl->agfl_magicnum) != XFS_AGFL_MAGIC)
+ if (agfl->agfl_magicnum != cpu_to_be32(XFS_AGFL_MAGIC))
return __this_address;
/*
* during growfs operations, the perag is not fully initialised,