mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
mm/damon/sysfs: kobject_del() probe dirs
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for data attribute probe directories by adding kobject_del() calls. Link: https://lore.kernel.org/20260628220121.97360-9-sj@kernel.org Fixes: bf3ea3d30880 ("mm/damon/sysfs: implement probe dir") Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -1137,6 +1137,7 @@ static void damon_sysfs_probes_rm_dirs(
|
||||
|
||||
for (i = 0; i < probes->nr; i++) {
|
||||
damon_sysfs_probe_rm_dirs(probes_arr[i]);
|
||||
kobject_del(&probes_arr[i]->kobj);
|
||||
kobject_put(&probes_arr[i]->kobj);
|
||||
}
|
||||
probes->nr = 0;
|
||||
|
||||
Reference in New Issue
Block a user