diff options
author | Zhang Yi <yi.zhang@huawei.com> | 2021-10-08 12:38:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-18 16:03:51 +0300 |
commit | 6bc8317b8cd5b2f8860f0923bab8085a6b4cb318 (patch) | |
tree | ba90f8ddb7fd71c51249f05df1c4a095a1e14c27 /fs/quota | |
parent | ceeb0a8a8716a1c72af3fa4d4f98c3aced32b037 (diff) | |
download | linux-6bc8317b8cd5b2f8860f0923bab8085a6b4cb318.tar.xz |
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/quota')
-rw-r--r-- | fs/quota/quota_tree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/quota/quota_tree.c b/fs/quota/quota_tree.c index c459ac0cb2c7..1a188fbdf34e 100644 --- a/fs/quota/quota_tree.c +++ b/fs/quota/quota_tree.c @@ -423,6 +423,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); |