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>
This commit is contained in:

committed by
Darrick J. Wong

parent
75d0230314
commit
e34d3e74eb
@@ -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,
|
||||
|
Reference in New Issue
Block a user