xfs: fix xfs_buf magic number endian checks

Create a separate magic16 check function so that we don't run afoul of
static checkers.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
Darrick J. Wong
2019-02-16 11:47:28 -08:00
parent 7588cbeec6
commit 15baadf72c
8 changed files with 45 additions and 23 deletions

View File

@@ -198,8 +198,8 @@ xfs_dir3_leaf_write_verify(
const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops = {
.name = "xfs_dir3_leaf1",
.magic = { cpu_to_be16(XFS_DIR2_LEAF1_MAGIC),
cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) },
.magic16 = { cpu_to_be16(XFS_DIR2_LEAF1_MAGIC),
cpu_to_be16(XFS_DIR3_LEAF1_MAGIC) },
.verify_read = xfs_dir3_leaf_read_verify,
.verify_write = xfs_dir3_leaf_write_verify,
.verify_struct = xfs_dir3_leaf_verify,
@@ -207,8 +207,8 @@ const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops = {
const struct xfs_buf_ops xfs_dir3_leafn_buf_ops = {
.name = "xfs_dir3_leafn",
.magic = { cpu_to_be16(XFS_DIR2_LEAFN_MAGIC),
cpu_to_be16(XFS_DIR3_LEAFN_MAGIC) },
.magic16 = { cpu_to_be16(XFS_DIR2_LEAFN_MAGIC),
cpu_to_be16(XFS_DIR3_LEAFN_MAGIC) },
.verify_read = xfs_dir3_leaf_read_verify,
.verify_write = xfs_dir3_leaf_write_verify,
.verify_struct = xfs_dir3_leaf_verify,