Re: [PATCH 07/12] xfs: Remove the macro XFS_BUF_PTR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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@xxxxxxx>

> 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

. . .

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux