aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2014-02-26 23:15:27 -0500
committerDave Chinner <david@fromorbit.com>2014-02-26 23:15:27 -0500
commit533b81c875589ad0a2fc116991534b4601195253 (patch)
tree8a8098e03198f28d448bf789f36832970e5255e2 /fs/xfs/xfs_ialloc.c
parente0d2c23a253149b4f8a6100f94ca62ddc4b2ae84 (diff)
xfs: Use defines for CRC offsets in all cases
Some calls to crc functions used useful #defines, others used awkward offsetof() constructs. Switch them all to #define to make things a bit cleaner. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/xfs_ialloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 5d7f105a1c82..d79210b15bc0 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -1572,7 +1572,7 @@ xfs_agi_read_verify(
1572 1572
1573 if (xfs_sb_version_hascrc(&mp->m_sb)) 1573 if (xfs_sb_version_hascrc(&mp->m_sb))
1574 agi_ok = xfs_verify_cksum(bp->b_addr, BBTOB(bp->b_length), 1574 agi_ok = xfs_verify_cksum(bp->b_addr, BBTOB(bp->b_length),
1575 offsetof(struct xfs_agi, agi_crc)); 1575 XFS_AGI_CRC_OFF);
1576 agi_ok = agi_ok && xfs_agi_verify(bp); 1576 agi_ok = agi_ok && xfs_agi_verify(bp);
1577 1577
1578 if (unlikely(XFS_TEST_ERROR(!agi_ok, mp, XFS_ERRTAG_IALLOC_READ_AGI, 1578 if (unlikely(XFS_TEST_ERROR(!agi_ok, mp, XFS_ERRTAG_IALLOC_READ_AGI,
@@ -1600,8 +1600,7 @@ xfs_agi_write_verify(
1600 1600
1601 if (bip) 1601 if (bip)
1602 XFS_BUF_TO_AGI(bp)->agi_lsn = cpu_to_be64(bip->bli_item.li_lsn); 1602 XFS_BUF_TO_AGI(bp)->agi_lsn = cpu_to_be64(bip->bli_item.li_lsn);
1603 xfs_update_cksum(bp->b_addr, BBTOB(bp->b_length), 1603 xfs_update_cksum(bp->b_addr, BBTOB(bp->b_length), XFS_AGI_CRC_OFF);
1604 offsetof(struct xfs_agi, agi_crc));
1605} 1604}
1606 1605
1607const struct xfs_buf_ops xfs_agi_buf_ops = { 1606const struct xfs_buf_ops xfs_agi_buf_ops = {