[PATCH] xfs: check for null dquot in xfs_quota_calc_throttle()

Dave Chinner david at fromorbit.com
Wed Oct 1 18:25:59 CDT 2014


On Wed, Oct 01, 2014 at 11:16:37AM -0500, Eric Sandeen wrote:
> Coverity spotted this.
> 
> Granted, we *just* checked xfs_inod_dquot() in the caller (by calling
> xfs_quota_need_throttle), but to be honest I don't know if this can
> race, and this is the only place we don't check the return value -
> and the check seems cheap and future-proof.
> 
> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
> ---
> 
> Sorry for the handwavy commit log, if it's obvious that it can
> race, feel free to fix the description. ;)

Description changed simply to say:

... this is the only place we don't check the return value, but the
check is cheap and future-proof, so add it.

And so:

Reviewed-by: Dave Chinner <dchinner at redhat.com>

-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list