summaryrefslogtreecommitdiff
path: root/mm/damon
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2024-07-01 19:53:32 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-07-05 04:05:50 +0300
commit64548bc5347bd0517ae25f8a7076e7f3193f4f19 (patch)
tree866ea8cb988118fbb540c66deebc1f2e3ca20910 /mm/damon
parent593a10dabe08dcf93259fce2badd8dc2528859a8 (diff)
downloadlinux-64548bc5347bd0517ae25f8a7076e7f3193f4f19.tar.xz
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: SeongJae Park <sj@kernel.org> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan 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: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon')
-rw-r--r--mm/damon/paddr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index af6aac388a43..a9ff35341d65 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -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 = {
/*