Re: [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR

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

 



On Fri, 2011-07-22 at 14:38 -0500, Alex Elder wrote:
> On Thu, 2011-07-21 at 17:33 -0700, Chandra Seetharaman wrote:
> > Remove the definition and usages of the macro XFS_BUF_SET_PTR.
> > 
> > Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
> > Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> One suggestion.  Otherwise:
> 
> Reviewed-by: Alex Elder <aelder@xxxxxxx>
> 
> > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> > index 4255a1c..21e770f 100644
> > --- a/fs/xfs/xfs_log.c
> > +++ b/fs/xfs/xfs_log.c
> > @@ -1395,8 +1395,9 @@ xlog_sync(xlog_t		*log,
> >  	if (split) {
> >  		bp = iclog->ic_log->l_xbuf;
> >  		XFS_BUF_SET_ADDR(bp, 0);	     /* logical 0 */
> > -		XFS_BUF_SET_PTR(bp, (xfs_caddr_t)((__psint_t)&(iclog->ic_header)+
> > -					    (__psint_t)count), split);
> > +		xfs_buf_associate_memory(bp,
> > +				(xfs_caddr_t)((__psint_t)&(iclog->ic_header)+
> > +				    (__psint_t)count), split);
> 
> If you just cast the address appropriately you can make this
> look a lot nicer:
> 
> 		xfs_buf_associate_memory(bp,
> 			(void *) &iclog->ic_header + count, split);
> 

will do
> >  		bp->b_fspriv = iclog;
> >  		bp->b_flags &= ~(XBF_FUA|XBF_FLUSH);
> >  		XFS_BUF_ASYNC(bp);
> 
> . . .
> 


_______________________________________________
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