提交 16fbff88 编写于 作者: Z Zhang Yi 提交者: Yang Yingliang

quota: correct error number in free_dqentry()

hulk inclusion
category: bugfix
bugzilla: 182754
CVE: NA
---------------------------

Fix the error path in free_dqentry(), pass out the error number if the
block to free is not correct.

Fixes: 1ccd14b9 ("quota: Split off quota tree handling into a separate file")
Link: https://lore.kernel.org/r/20211008093821.1001186-3-yi.zhang@huawei.comSigned-off-by: NZhang Yi <yi.zhang@huawei.com>
Cc: stable@kernel.org
Signed-off-by: NJan Kara <jack@suse.cz>
Reviewed-by: NYang Erkun <yangerkun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bf6ce07c
...@@ -422,6 +422,7 @@ static int free_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, ...@@ -422,6 +422,7 @@ static int free_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot,
quota_error(dquot->dq_sb, "Quota structure has offset to " quota_error(dquot->dq_sb, "Quota structure has offset to "
"other block (%u) than it should (%u)", blk, "other block (%u) than it should (%u)", blk,
(uint)(dquot->dq_off >> info->dqi_blocksize_bits)); (uint)(dquot->dq_off >> info->dqi_blocksize_bits));
ret = -EIO;
goto out_buf; goto out_buf;
} }
ret = read_blk(info, blk, buf); ret = read_blk(info, blk, buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册