Re: [PATCH 09/12] Replace the macro XFS_BUF_ISPINNED with helper xfs_buf_ispinned

[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:
> > Replace the macro XFS_BUF_ISPINNED with an inline helper function
> > xfs_buf_ispinned, and change all its usages.
> > 
> > Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
> > Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> One simple suggestion below.  Otherwise:
> 
> Reviewed-by: Alex Elder <aelder@xxxxxxx>
> 
> > diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
> > index 7b1f484..71e1d6f 100644
> > --- a/fs/xfs/linux-2.6/xfs_buf.h
> > +++ b/fs/xfs/linux-2.6/xfs_buf.h
> > @@ -280,7 +280,10 @@ xfs_buf_set_ref(
> >  #define XFS_BUF_SET_VTYPE_REF(bp, type, ref)	xfs_buf_set_ref(bp, ref)
> >  #define XFS_BUF_SET_VTYPE(bp, type)		do { } while (0)
> >  
> > -#define XFS_BUF_ISPINNED(bp)	atomic_read(&((bp)->b_pin_count))
> > +static inline int xfs_buf_ispinned(struct xfs_buf *bp)
> > +{
> > +	return atomic_read(&(bp->b_pin_count));
> 
> Good idea.  But drop the extra parentheses:
> 
> 	return atomic_read(&bp->b_pin_count);

will do
> 
> > +}
> >  
> >  #define XFS_BUF_FINISH_IOWAIT(bp)	complete(&bp->b_iowait);
> >  
> 
> 


_______________________________________________
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