From 80bbeba74c8a3a841ffaa27fe89bb49be805f4c8 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Tue, 21 Mar 2023 09:06:16 +0000 Subject: [PATCH] api: cgroup_copy_controller_values() mark settings dirty Copying controllers settings from source to destination cgroups, overwrites the value of the destination cgroup controller and hence the dirty flag for all the controller settings should be unconditionally set. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka (cherry picked from commit 4a31a98174e2593b8cf0be2b8ee23e21ae8a84e5) --- src/api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api.c b/src/api.c index 14f703dc..7f9e49d9 100644 --- a/src/api.c +++ b/src/api.c @@ -2630,8 +2630,11 @@ int cgroup_copy_controller_values(struct cgroup_controller * const dst, } else { dst_val->prev_name = NULL; } - - dst_val->dirty = src_val->dirty; + /* + * set dirty flag unconditionally, as we overwrite + * destination controller values. + */ + dst_val->dirty = true; } return ret; -- 2.47.2