diff options
author | Eric Sandeen <sandeen@redhat.com> | 2014-02-27 05:15:27 +0100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-02-27 05:15:27 +0100 |
commit | 533b81c875589ad0a2fc116991534b4601195253 (patch) | |
tree | 8a8098e03198f28d448bf789f36832970e5255e2 /fs/xfs/xfs_inode_buf.c | |
parent | xfs: skip pointless CRC updates after verifier failures (diff) | |
download | linux-533b81c875589ad0a2fc116991534b4601195253.tar.xz linux-533b81c875589ad0a2fc116991534b4601195253.zip |
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.c | 4 |
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); } |