summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_sb.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2014-02-27 08:15:27 +0400
committerDave Chinner <david@fromorbit.com>2014-02-27 08:15:27 +0400
commit533b81c875589ad0a2fc116991534b4601195253 (patch)
tree8a8098e03198f28d448bf789f36832970e5255e2 /fs/xfs/xfs_sb.c
parente0d2c23a253149b4f8a6100f94ca62ddc4b2ae84 (diff)
downloadlinux-533b81c875589ad0a2fc116991534b4601195253.tar.xz
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_sb.c')
-rw-r--r--fs/xfs/xfs_sb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_sb.c b/fs/xfs/xfs_sb.c
index 1e116794bb66..1ea7c865b208 100644
--- a/fs/xfs/xfs_sb.c
+++ b/fs/xfs/xfs_sb.c
@@ -611,7 +611,7 @@ xfs_sb_read_verify(
dsb->sb_crc != 0)) {
if (!xfs_verify_cksum(bp->b_addr, BBTOB(bp->b_length),
- offsetof(struct xfs_sb, sb_crc))) {
+ XFS_SB_CRC_OFF)) {
/* Only fail bad secondaries on a known V5 filesystem */
if (bp->b_bn == XFS_SB_DADDR ||
xfs_sb_version_hascrc(&mp->m_sb)) {
@@ -674,8 +674,7 @@ xfs_sb_write_verify(
if (bip)
XFS_BUF_TO_SBP(bp)->sb_lsn = cpu_to_be64(bip->bli_item.li_lsn);
- xfs_update_cksum(bp->b_addr, BBTOB(bp->b_length),
- offsetof(struct xfs_sb, sb_crc));
+ xfs_update_cksum(bp->b_addr, BBTOB(bp->b_length), XFS_SB_CRC_OFF);
}
const struct xfs_buf_ops xfs_sb_buf_ops = {