summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorEric Sandeen2017-01-28 08:16:37 +0100
committerDarrick J. Wong2017-01-31 01:32:24 +0100
commitf88ae46b09e93ef07ac9efaf85df62adb5ba58e6 (patch)
tree3760a0ed2c9020e6417c36636c49d1082586e945 /fs/xfs/libxfs/xfs_bmap.c
parentLinux 4.10-rc6 (diff)
downloadkernel-qcow2-linux-f88ae46b09e93ef07ac9efaf85df62adb5ba58e6.tar.gz
kernel-qcow2-linux-f88ae46b09e93ef07ac9efaf85df62adb5ba58e6.tar.xz
kernel-qcow2-linux-f88ae46b09e93ef07ac9efaf85df62adb5ba58e6.zip
xfs: glean crc status from mp not flags in xfs_btree_init_block_int
xfs_btree_init_block_int() can determine whether crcs are in effect without the passed-in XFS_BTREE_CRC_BLOCKS flag; the mp argument allows us to determine this from the superblock. Remove the flag from callers, and use xfs_sb_version_hascrc(&mp->m_sb) internally instead. This removes one difference between the if & else cases in the callers. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-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_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index bfc00de5c6f1..1d4b8d5edaaf 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -743,7 +743,7 @@ xfs_bmap_extents_to_btree(
if (xfs_sb_version_hascrc(&mp->m_sb))
xfs_btree_init_block_int(mp, block, XFS_BUF_DADDR_NULL,
XFS_BMAP_CRC_MAGIC, 1, 1, ip->i_ino,
- XFS_BTREE_LONG_PTRS | XFS_BTREE_CRC_BLOCKS);
+ XFS_BTREE_LONG_PTRS);
else
xfs_btree_init_block_int(mp, block, XFS_BUF_DADDR_NULL,
XFS_BMAP_MAGIC, 1, 1, ip->i_ino,
@@ -820,7 +820,7 @@ try_another_ag:
if (xfs_sb_version_hascrc(&mp->m_sb))
xfs_btree_init_block_int(mp, ablock, abp->b_bn,
XFS_BMAP_CRC_MAGIC, 0, 0, ip->i_ino,
- XFS_BTREE_LONG_PTRS | XFS_BTREE_CRC_BLOCKS);
+ XFS_BTREE_LONG_PTRS);
else
xfs_btree_init_block_int(mp, ablock, abp->b_bn,
XFS_BMAP_MAGIC, 0, 0, ip->i_ino,