diff options
author | Eric Sandeen <sandeen@redhat.com> | 2014-02-26 23:15:27 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-02-26 23:15:27 -0500 |
commit | 533b81c875589ad0a2fc116991534b4601195253 (patch) | |
tree | 8a8098e03198f28d448bf789f36832970e5255e2 /fs/xfs/xfs_inode_buf.c | |
parent | e0d2c23a253149b4f8a6100f94ca62ddc4b2ae84 (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_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( | |||
306 | if (!xfs_sb_version_hascrc(&mp->m_sb)) | 306 | if (!xfs_sb_version_hascrc(&mp->m_sb)) |
307 | return false; | 307 | return false; |
308 | if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, | 308 | if (!xfs_verify_cksum((char *)dip, mp->m_sb.sb_inodesize, |
309 | offsetof(struct xfs_dinode, di_crc))) | 309 | XFS_DINODE_CRC_OFF)) |
310 | return false; | 310 | return false; |
311 | if (be64_to_cpu(dip->di_ino) != ip->i_ino) | 311 | if (be64_to_cpu(dip->di_ino) != ip->i_ino) |
312 | return false; | 312 | return false; |
@@ -327,7 +327,7 @@ xfs_dinode_calc_crc( | |||
327 | 327 | ||
328 | ASSERT(xfs_sb_version_hascrc(&mp->m_sb)); | 328 | ASSERT(xfs_sb_version_hascrc(&mp->m_sb)); |
329 | crc = xfs_start_cksum((char *)dip, mp->m_sb.sb_inodesize, | 329 | crc = xfs_start_cksum((char *)dip, mp->m_sb.sb_inodesize, |
330 | offsetof(struct xfs_dinode, di_crc)); | 330 | XFS_DINODE_CRC_OFF); |
331 | dip->di_crc = xfs_end_cksum(crc); | 331 | dip->di_crc = xfs_end_cksum(crc); |
332 | } | 332 | } |
333 | 333 | ||