summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_block.h
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_block.h
parent78f70cd7b7e8fd44dc89af4f72fb110d865338a1 (diff)
downloadop-kernel-dev-4f6ae1a49ed5c81501d6f7385416bb4e07289e99.zip
op-kernel-dev-4f6ae1a49ed5c81501d6f7385416bb4e07289e99.tar.gz
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_block.h')
-rw-r--r--fs/xfs/xfs_dir2_block.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dir2_block.h b/fs/xfs/xfs_dir2_block.h
index 10e6896..fe91f88 100644
--- a/fs/xfs/xfs_dir2_block.h
+++ b/fs/xfs/xfs_dir2_block.h
@@ -61,10 +61,9 @@ typedef struct xfs_dir2_block {
* Pointer to the leaf header embedded in a data block (1-block format)
*/
static inline xfs_dir2_block_tail_t *
-xfs_dir2_block_tail_p(struct xfs_mount *mp, xfs_dir2_block_t *block)
+xfs_dir2_block_tail_p(struct xfs_mount *mp, xfs_dir2_data_hdr_t *hdr)
{
- return (((xfs_dir2_block_tail_t *)
- ((char *)(block) + (mp)->m_dirblksize)) - 1);
+ return ((xfs_dir2_block_tail_t *)((char *)hdr + mp->m_dirblksize)) - 1;
}
/*
OpenPOWER on IntegriCloud