mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
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: 3883a79abd
("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
This commit is contained in:
parent
9f74ae8c9a
commit
db902986de
|
@ -927,8 +927,7 @@ unsigned long z_erofs_shrink_scan(struct erofs_sb_info *sbi,
|
||||||
unsigned long nr_shrink)
|
unsigned long nr_shrink)
|
||||||
{
|
{
|
||||||
struct z_erofs_pcluster *pcl;
|
struct z_erofs_pcluster *pcl;
|
||||||
unsigned int freed = 0;
|
unsigned long index, freed = 0;
|
||||||
unsigned long index;
|
|
||||||
|
|
||||||
xa_lock(&sbi->managed_pslots);
|
xa_lock(&sbi->managed_pslots);
|
||||||
xa_for_each(&sbi->managed_pslots, index, pcl) {
|
xa_for_each(&sbi->managed_pslots, index, pcl) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user