aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2023-06-05 22:07:30 +0800
committerJan Kara <[email protected]>2023-06-05 16:50:30 +0200
commit6a4e3363792e30177cc3965697e34ddcea8b900b (patch)
tree8097eb5b34039f81f2d5450c67f1366022e7cd8c /lib/mpi/mpi-sub-ui.c
parentaac2fa20132e390e87270e3a738e86abcf1aea8b (diff)
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]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions