erofs: guard on-disk algorithm IDs against Z_EROFS_COMPRESSION_MAX

All on-disk algorithm IDs should be validated against
supported Z_EROFS_COMPRESSION_MAX.

This includes a partial revert of a previous commit and also adds
validation for encoded extents.

Fixes: 131897c65e ("erofs: fix invalid algorithm for encoded extents")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <xiang@kernel.org>
This commit is contained in:
Gao Xiang 2026-08-14 16:14:37 +08:00
commit 6847d4d1a2
2 changed files with 22 additions and 15 deletions