Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quota: Properly disable quotas when add_dquot_ref() fails
When add_dquot_ref() fails (usually due to IO error or ENOMEM), we want to disable quotas we are trying to enable. However dquot_disable() call was passed just the flags we are enabling so in case flags == DQUOT_USAGE_ENABLED dquot_disable() call will just fail with EINVAL instead of properly disabling quotas. Fix the problem by always passing DQUOT_LIMITS_ENABLED | DQUOT_USAGE_ENABLED to dquot_disable() in this case. Reported-and-tested-by: Ye Bin <[email protected]> Reported-by: [email protected] Signed-off-by: Jan Kara <[email protected]> Message-Id: <[email protected]>
- Loading branch information