]> git.baikalelectronics.ru Git - kernel.git/commitdiff
quota: correct error number in free_dqentry()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 8 Oct 2021 09:38:21 +0000 (17:38 +0800)
committerJan Kara <jack@suse.cz>
Mon, 11 Oct 2021 08:57:04 +0000 (10:57 +0200)
Fix the error path in free_dqentry(), pass out the error number if the
block to free is not correct.

Fixes: a1c73b3d75ae ("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>
fs/quota/quota_tree.c

index 583b7f7715f9a18df63e5a0f29db9449b2ef7143..5f2405994280a1161796225d34d83c2e46541ee9 100644 (file)
@@ -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);