Skip to content

Commit 64548bc

Browse files
sjp38akpm00
authored andcommitted
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/[email protected] Fixes: 5311c0a2eee3 ("mm/damon/paddr: introduce DAMOS_MIGRATE_COLD action for demotion") Signed-off-by: SeongJae Park <[email protected]> Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Cc: Honggyu Kim <[email protected]> Cc: Hyeongtak Ji <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 593a10d commit 64548bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/damon/paddr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static unsigned int __damon_pa_migrate_folio_list(
332332
struct list_head *migrate_folios, struct pglist_data *pgdat,
333333
int target_nid)
334334
{
335-
unsigned int nr_succeeded;
335+
unsigned int nr_succeeded = 0;
336336
nodemask_t allowed_mask = NODE_MASK_NONE;
337337
struct migration_target_control mtc = {
338338
/*

0 commit comments

Comments
 (0)