xfs
[Top] [All Lists]

Re: [RFC PATCH 2/4] Define a new function xfs_inode_dquot()

To: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Subject: Re: [RFC PATCH 2/4] Define a new function xfs_inode_dquot()
From: Ben Myers <bpm@xxxxxxx>
Date: Fri, 3 Feb 2012 10:21:34 -0600
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <1327434096.2213.18.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20120123173118.31546.3353.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20120123173130.31546.80744.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20120124174850.GE9853@xxxxxxxxxxxxx> <1327434096.2213.18.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
Hey Chandra,

On Tue, Jan 24, 2012 at 01:41:36PM -0600, Chandra Seetharaman wrote:
> On Tue, 2012-01-24 at 12:48 -0500, Christoph Hellwig wrote:
> > On Mon, Jan 23, 2012 at 11:31:30AM -0600, Chandra Seetharaman wrote:
> > > Define a new function xfs_inode_dquot() that takes a inode pointer
> > > and a disk quota type and returns the quota pointer for the specified
> > > quota type.
> > > 
> > > This simplifies the xfs_qm_dqget() error path significantly.
> > 
> > Looks good,
> > 
> > Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> >
> > > +static inline xfs_dquot_t *xfs_inode_dquot(struct xfs_inode *ip, int 
> > > type)
> > > +{
> > > + type &= XFS_DQ_ALLTYPES;
> > > + switch(type) {
> > 
> > Same style nitpick as for the last patch.
> > 
> > Btw, instead of masking out XFS_DQ_ALLTYPES first this would be more
> > readable as:
> > 
> >     switch (type & XFS_DQ_ALLTYPES) {
> > 
> > (that also applies to the previous patch).
> > 
> 
> Will fix both of these in the next version.

I'll fix them up.  No need to post again.  I also twiddled the order of
USER/GROUP/PROJ in xfs_inode_dquot to match xfs_this_quota_on.

Looks good.
Reviewed-by: Ben Myers <bpm@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [RFC PATCH 2/4] Define a new function xfs_inode_dquot(), Ben Myers <=