Re: [PATCH v9 3/6] xfs: Add pquota fields where gquota is used.

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

 



On Mon, 2013-06-24 at 18:00 +1000, Dave Chinner wrote:

<snip>
> > @@ -559,8 +596,13 @@ xfs_qm_dqattach_locked(
> >  		 * 100% all the time. It is just a hint, and this will
> >  		 * succeed in general.
> >  		 */
> > -		if (ip->i_udquot->q_gdquot != ip->i_gdquot)
> > -			xfs_qm_dqattach_grouphint(ip->i_udquot, ip->i_gdquot);
> > +		if (XFS_IS_GQUOTA_ON(mp) &&
> > +				ip->i_udquot->q_gdquot != ip->i_gdquot)
> > +			xfs_qm_dqattach_hint(ip, XFS_DQ_GROUP);
> > +
> > +		if (XFS_IS_PQUOTA_ON(mp) &&
> > +				ip->i_udquot->q_pdquot != ip->i_pdquot)
> > +			xfs_qm_dqattach_hint(ip, XFS_DQ_PROJ);
> 
> Why do we need the XFS_IS_GQUOTA_ON/XFS_IS_PQUOTA_ON checks there?
> If group quotas are not on, then both the hint and in the
> inode pointers to the group dquot will be NULL, and therefore equal?
> i.e. we don't need to even check if quotas are enabled here...
> 
> Indeed, why pass (ip, quota type) to xfs_qm_dqattach_hint()? why not
> just pass the locations directly like:
> 
> 			xfs_qm_dqattach_hint(&ip->i_udquot->q_pdquot,
> 					     ip->i_pdquot):
> 

Just looked at xfs_qm_dqattach_hint(), it grabs the dqlock of
ip->i_udquot, which means I have to have i_udquot also as another
parameter.


_______________________________________________
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