mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
218106a110
commit
69ef921b55
15 changed files with 208 additions and 197 deletions
|
@ -2127,7 +2127,7 @@ xfs_read_agf(
|
|||
* Validate the magic number of the agf block.
|
||||
*/
|
||||
agf_ok =
|
||||
be32_to_cpu(agf->agf_magicnum) == XFS_AGF_MAGIC &&
|
||||
agf->agf_magicnum == cpu_to_be32(XFS_AGF_MAGIC) &&
|
||||
XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) &&
|
||||
be32_to_cpu(agf->agf_freeblks) <= be32_to_cpu(agf->agf_length) &&
|
||||
be32_to_cpu(agf->agf_flfirst) < XFS_AGFL_SIZE(mp) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue