erofs: fix missing unmap if z_erofs_get_extent_compressedlen() fails
authorGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 5 Dec 2022 15:00:49 +0000 (23:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:31:59 +0000 (13:31 +0100)
commit373b6f350aecf5dca2e7474f0b4ec8cca659f2f0
tree1f222b642f972b57df68fddb54bd4f0bcde4c8cb
parent618e712b99c78d1004b70a1a9ab0a4830d0b2673
erofs: fix missing unmap if z_erofs_get_extent_compressedlen() fails

[ Upstream commit d5d188b8f8b38d3d71dd05993874b4fc9284ce95 ]

Otherwise, meta buffers could be leaked.

Fixes: cec6e93beadf ("erofs: support parsing big pcluster compress indexes")
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20221205150050.47784-1-hsiangkao@linux.alibaba.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/erofs/zmap.c