[PATCH 07/12] xfs: Remove the macro XFS_BUF_PTR
Alex Elder
aelder at sgi.com
Fri Jul 22 14:38:26 CDT 2011
On Thu, 2011-07-21 at 17:33 -0700, Chandra Seetharaman wrote:
> Remove the definition and usages of the macro XFS_BUF_PTR.
>
> Signed-off-by: Chandra Seetharaman <sekharan at us.ibm.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
This looks fine. One little comment below but it's
really more like a rhetorical question (or statement).
Well done.
Reviewed-by: Alex Elder <aelder at sgi.com>
> diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
> index ae2c2e7..6a42f71 100644
> --- a/fs/xfs/linux-2.6/xfs_buf.c
> +++ b/fs/xfs/linux-2.6/xfs_buf.c
> @@ -1320,7 +1320,7 @@ xfs_buf_offset(
> struct page *page;
>
> if (bp->b_flags & XBF_MAPPED)
> - return XFS_BUF_PTR(bp) + offset;
> + return bp->b_addr + offset;
I guess we're using GCC-isms elsewhere (including
possibly this one) so I suppose using arithmetic
on a void pointer is OK. In any case it looks
nicer this way...
>
> offset += bp->b_offset;
> page = bp->b_pages[offset >> PAGE_SHIFT];
> diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
> index 6758697..6ae7bde 100644
> --- a/fs/xfs/linux-2.6/xfs_buf.h
> +++ b/fs/xfs/linux-2.6/xfs_buf.h
. . .
More information about the xfs
mailing list