summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_data.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-08 14:35:27 +0200
committerChristoph Hellwig <hch@lst.de>2011-07-08 14:35:27 +0200
commit4f6ae1a49ed5c81501d6f7385416bb4e07289e99 (patch)
treef9e302754cff53ad96eaca3b0b4de1fd91a9beb2 /fs/xfs/xfs_dir2_data.c
parent78f70cd7b7e8fd44dc89af4f72fb110d865338a1 (diff)
downloadtalos-obmc-linux-4f6ae1a49ed5c81501d6f7385416bb4e07289e99.tar.gz
talos-obmc-linux-4f6ae1a49ed5c81501d6f7385416bb4e07289e99.zip
xfs: avoid usage of struct xfs_dir2_block
In most places we can simply pass around and use the struct xfs_dir2_data_hdr, which is the first and most important member of struct xfs_dir2_block instead of the full structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_data.c')
-rw-r--r--fs/xfs/xfs_dir2_data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c
index 921595b84f5b..46ccb83bdab4 100644
--- a/fs/xfs/xfs_dir2_data.c
+++ b/fs/xfs/xfs_dir2_data.c
@@ -72,7 +72,7 @@ xfs_dir2_data_check(
bf = d->hdr.bestfree;
p = (char *)d->u;
if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) {
- btp = xfs_dir2_block_tail_p(mp, (xfs_dir2_block_t *)d);
+ btp = xfs_dir2_block_tail_p(mp, &d->hdr);
lep = xfs_dir2_block_leaf_p(btp);
endp = (char *)lep;
} else
@@ -348,7 +348,7 @@ xfs_dir2_data_freescan(
*/
p = (char *)d->u;
if (be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC) {
- btp = xfs_dir2_block_tail_p(mp, (xfs_dir2_block_t *)d);
+ btp = xfs_dir2_block_tail_p(mp, &d->hdr);
endp = (char *)xfs_dir2_block_leaf_p(btp);
} else
endp = (char *)d + mp->m_dirblksize;
@@ -537,7 +537,7 @@ xfs_dir2_data_make_free(
xfs_dir2_block_tail_t *btp; /* block tail */
ASSERT(be32_to_cpu(d->hdr.magic) == XFS_DIR2_BLOCK_MAGIC);
- btp = xfs_dir2_block_tail_p(mp, (xfs_dir2_block_t *)d);
+ btp = xfs_dir2_block_tail_p(mp, &d->hdr);
endptr = (char *)xfs_dir2_block_leaf_p(btp);
}
/*
OpenPOWER on IntegriCloud