[PATCH 13/17] xfs: get rid of indirections in the quotaops implementation

Christoph Hellwig hch at infradead.org
Mon Feb 9 01:46:32 CST 2009


On Mon, Feb 09, 2009 at 01:41:15PM +1100, Dave Chinner wrote:
> > +STATIC int
> > +xfs_fs_get_xstate(
> > +	struct super_block	*sb,
> > +	struct fs_quota_stat	*fqs)
> > +{
> > +	struct xfs_mount	*mp = XFS_M(sb);
> > +
> > +	if (!XFS_IS_QUOTA_RUNNING(mp))
> > +		return -ENOSYS;
> > +	return xfs_qm_scall_getqstat(mp, fqs);
> 
> The return of xfs_qm_scall_getqstat() needs to be negated.

Currently it only ever returns 0.  But I agree, if this ever returns
an error it would be a positive one, so I added the inversion.

> > +	return xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq);
> 
> That should be negated as well.

But this one can already return a positive error, so it's definitively
needed.

Thanks, I've commited the updated version.




More information about the xfs mailing list