aboutsummaryrefslogtreecommitdiff
path: root/fs/affs
diff options
context:
space:
mode:
authorJan Kara2023-06-05 22:07:30 +0800
committerGreg Kroah-Hartman2023-07-27 08:50:32 +0200
commit1f2ec87f4ab833d56053f41cbf8febca7c9b264c (patch)
tree1d13aa5653cbbe4e366824d5f83fb2ebe7adc411 /fs/affs
parent2a97ec78092fd3e5dd7013b6fa88b8923ebaa15f (diff)
quota: Properly disable quotas when add_dquot_ref() fails
[ Upstream commit 6a4e3363792e30177cc3965697e34ddcea8b900b ] 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 <yebin10@huawei.com> Reported-by: syzbot+e633c79ceaecbf479854@syzkaller.appspotmail.com Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230605140731.2427629-2-yebin10@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/affs')
0 files changed, 0 insertions, 0 deletions