On Mon, Jun 24, 2013 at 06:25:04PM -0500, Chandra Seetharaman wrote: > 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. Ah, it does too. Never mind, leave it as it is then. :) Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs