summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_fsops.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2017-01-28 10:16:37 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2017-01-31 03:32:24 +0300
commitf88ae46b09e93ef07ac9efaf85df62adb5ba58e6 (patch)
tree3760a0ed2c9020e6417c36636c49d1082586e945 /fs/xfs/xfs_fsops.c
parent566cf877a1fcb6d6dc0126b076aad062054c2637 (diff)
downloadlinux-f88ae46b09e93ef07ac9efaf85df62adb5ba58e6.tar.xz
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/xfs_fsops.c')
-rw-r--r--fs/xfs/xfs_fsops.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 242e8091296d..21e3cdbaebbc 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -354,7 +354,7 @@ xfs_growfs_data_private(
if (xfs_sb_version_hascrc(&mp->m_sb))
xfs_btree_init_block(mp, bp, XFS_ABTB_CRC_MAGIC, 0, 1,
- agno, XFS_BTREE_CRC_BLOCKS);
+ agno, 0);
else
xfs_btree_init_block(mp, bp, XFS_ABTB_MAGIC, 0, 1,
agno, 0);
@@ -383,7 +383,7 @@ xfs_growfs_data_private(
if (xfs_sb_version_hascrc(&mp->m_sb))
xfs_btree_init_block(mp, bp, XFS_ABTC_CRC_MAGIC, 0, 1,
- agno, XFS_BTREE_CRC_BLOCKS);
+ agno, 0);
else
xfs_btree_init_block(mp, bp, XFS_ABTC_MAGIC, 0, 1,
agno, 0);
@@ -414,7 +414,7 @@ xfs_growfs_data_private(
}
xfs_btree_init_block(mp, bp, XFS_RMAP_CRC_MAGIC, 0, 0,
- agno, XFS_BTREE_CRC_BLOCKS);
+ agno, 0);
block = XFS_BUF_TO_BLOCK(bp);
@@ -490,7 +490,7 @@ xfs_growfs_data_private(
if (xfs_sb_version_hascrc(&mp->m_sb))
xfs_btree_init_block(mp, bp, XFS_IBT_CRC_MAGIC, 0, 0,
- agno, XFS_BTREE_CRC_BLOCKS);
+ agno, 0);
else
xfs_btree_init_block(mp, bp, XFS_IBT_MAGIC, 0, 0,
agno, 0);
@@ -515,8 +515,7 @@ xfs_growfs_data_private(
if (xfs_sb_version_hascrc(&mp->m_sb))
xfs_btree_init_block(mp, bp, XFS_FIBT_CRC_MAGIC,
- 0, 0, agno,
- XFS_BTREE_CRC_BLOCKS);
+ 0, 0, agno, 0);
else
xfs_btree_init_block(mp, bp, XFS_FIBT_MAGIC, 0,
0, agno, 0);
@@ -541,8 +540,7 @@ xfs_growfs_data_private(
}
xfs_btree_init_block(mp, bp, XFS_REFC_CRC_MAGIC,
- 0, 0, agno,
- XFS_BTREE_CRC_BLOCKS);
+ 0, 0, agno, 0);
error = xfs_bwrite(bp);
xfs_buf_relse(bp);