Skip to content

Commit db90298

Browse files
committed
erofs: fix potential return value overflow of z_erofs_shrink_scan()
z_erofs_shrink_scan() could return small numbers due to the mistyped `freed`. Although I don't think it has any visible impact. Fixes: 3883a79 ("staging: erofs: introduce VLE decompression support") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20250114040058.459981-1-hsiangkao@linux.alibaba.com
1 parent 9f74ae8 commit db90298

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/erofs/zdata.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,7 @@ unsigned long z_erofs_shrink_scan(struct erofs_sb_info *sbi,
927927
unsigned long nr_shrink)
928928
{
929929
struct z_erofs_pcluster *pcl;
930-
unsigned int freed = 0;
931-
unsigned long index;
930+
unsigned long index, freed = 0;
932931

933932
xa_lock(&sbi->managed_pslots);
934933
xa_for_each(&sbi->managed_pslots, index, pcl) {

0 commit comments

Comments
 (0)