summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode_buf.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_inode_buf.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_inode_buf.c')
-rw-r--r--fs/xfs/xfs_inode_buf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode_buf.c b/fs/xfs/xfs_inode_buf.c
index 4fc9f39dd89e..606b43a48724 100644
--- a/fs/xfs/xfs_inode_buf.c
+++ b/fs/xfs/xfs_inode_buf.c
@@ -306,7 +306,7 @@ xfs_dinode_verify(
if (!xfs_sb_version_hascrc(&mp->m_sb))
return false;
if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize,
- offsetof(struct xfs_dinode, di_crc)))
+ XFS_DINODE_CRC_OFF))
return false;
if (be64_to_cpu(dip->di_ino) != ip->i_ino)
return false;
@@ -327,7 +327,7 @@ xfs_dinode_calc_crc(
ASSERT(xfs_sb_version_hascrc(&mp->m_sb));
crc = xfs_start_cksum((char *)dip, mp->m_sb.sb_inodesize,
- offsetof(struct xfs_dinode, di_crc));
+ XFS_DINODE_CRC_OFF);
dip->di_crc = xfs_end_cksum(crc);
}