erofs: do sanity check on m->type in z_erofs_load_compact_lcluster()
authorChao Yu <chao@kernel.org>
Tue, 8 Jul 2025 11:09:28 +0000 (19:09 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 24 Jul 2025 11:42:05 +0000 (19:42 +0800)
commit1a5223c182fdb3bb3c0ca85cec101c740f685ab6
tree71c32c563aa0db76ac5393e09971eb0af83e72c8
parent96debe8c27ee2494bbd78abf3744745a84a745f1
erofs: do sanity check on m->type in z_erofs_load_compact_lcluster()

All below functions will do sanity check on m->type, let's move sanity
check to z_erofs_load_compact_lcluster() for cleanup.
- z_erofs_map_blocks_fo
- z_erofs_get_extent_compressedlen
- z_erofs_get_extent_decompressedlen
- z_erofs_extent_lookback

Reviewed-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250708110928.3110375-1-chao@kernel.org
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/zmap.c