summaryrefslogtreecommitdiff
path: root/fs/quota
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2021-10-08 17:38:21 +0800
committerJan Kara <jack@suse.cz>2021-10-11 10:57:04 +0200
commitd0e36a62bd4c60c09acc40e06ba4831a4d0bc75b (patch)
treeb7724e83ba0c109ac887926e12f2044d777a00be /fs/quota
parent9bf3d20331295b1ecb81f4ed9ef358c51699a050 (diff)
quota: correct error number in free_dqentry()
Fix the error path in free_dqentry(), pass out the error number if the block to free is not correct. Fixes: 1ccd14b9c271 ("quota: Split off quota tree handling into a separate file") Link: https://lore.kernel.org/r/20211008093821.1001186-3-yi.zhang@huawei.com Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Cc: stable@kernel.org Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/quota_tree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c
index 583b7f7715f9..5f2405994280 100644
--- a/fs/quota/quota_tree.c
+++ b/fs/quota/quota_tree.c
@@ -414,6 +414,7 @@ static int free_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot,
quota_error(dquot->dq_sb, "Quota structure has offset to "
"other block (%u) than it should (%u)", blk,
(uint)(dquot->dq_off >> info->dqi_blocksize_bits));
+ ret = -EIO;
goto out_buf;
}
ret = read_blk(info, blk, buf);