Commit 64548bc5 authored by SeongJae Park's avatar SeongJae Park Committed by Andrew Morton

mm/damon/paddr: initialize nr_succeeded in __damon_pa_migrate_folio_list()

The variable is supposed to be set via later migrate_pages() call. 
However, the function does not do that when CONFIG_MIGRATION is unset. 
Initialize the variable to zero.

Link: https://lkml.kernel.org/r/20240701165332.47495-1-sj@kernel.org
Fixes: 5311c0a2eee3 ("mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion")
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202406251102.GE07hqfQ-lkp@intel.com/
Cc: Honggyu Kim <honggyu.kim@sk.com>
Cc: Hyeongtak Ji <hyeongtak.ji@sk.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 593a10da
......@@ -332,7 +332,7 @@ static unsigned int __damon_pa_migrate_folio_list(
struct list_head *migrate_folios, struct pglist_data *pgdat,
int target_nid)
{
unsigned int nr_succeeded;
unsigned int nr_succeeded = 0;
nodemask_t allowed_mask = NODE_MASK_NONE;
struct migration_target_control mtc = {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment