mm-damon-sysfs-schemes-fix-double-increment-of-nr_regions.patch removed from -mm tree
The quilt patch titled
Subject: mm/damon/sysfs-schemes: fix double increment of nr_regions
has been removed from the -mm tree. Its filename was
mm-damon-sysfs-schemes-fix-double-increment-of-nr_regions.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Vineet Agarwal <[email protected]>
Subject: mm/damon/sysfs-schemes: fix double increment of nr_regions
Date: Tue, 12 May 2026 09:41:57 +0530
damos_sysfs_populate_region_dir() increments sysfs_regions->nr_regions twice when adding a new region: once explicitly before kobject_init_and_add(), and once again through the post-increment used for the kobject name.
As a result, nr_regions no longer matches the actual number of live regions, and region directory names skip numbers (1, 3, 5, ...).
Use the already incremented value for naming instead of incrementing nr_regions a second time.
---
mm/damon/sysfs-schemes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/damon/sysfs-schemes.c renamed from mm/damon/sysfs-schemes.c~mm-damon-sysfs-schemes-fix-double-increment-of-nr_regions +1 -1
@@ -2995,7 +2995,7 @@ void damos_sysfs_populate_region_dir(strif (kobject_init_and_add (®ion->kobj, &damon_sysfs_scheme_region_ktype, &sysfs_regions->kobj,"%d" , - sysfs_regions->nr_regions++)) { + sysfs_regions->nr_regions)) {kobject_put (®ion->kobj);return ; }
_
Patches currently in -mm which might be from [email protected] are