summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2021-10-08 17:38:21 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-26 11:58:36 +0100
commitbb7294153ad606c0c716f58999afcd2270a79f7e (patch)
tree34ac03bfcbdf470e83d2add5850d09767d2f402b /fs
parent7a40f3e53f5de1d6876df8a9e8025b50616b8818 (diff)
downloadlinux-stable-bb7294153ad606c0c716f58999afcd2270a79f7e.tar.gz
linux-stable-bb7294153ad606c0c716f58999afcd2270a79f7e.tar.bz2
linux-stable-bb7294153ad606c0c716f58999afcd2270a79f7e.zip
quota: correct error number in free_dqentry()
commit d0e36a62bd4c60c09acc40e06ba4831a4d0bc75b upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-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 cf794eba4b32..4f21724a212b 100644
--- a/fs/quota/quota_tree.c
+++ b/fs/quota/quota_tree.c
@@ -416,6 +416,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);