From: Kamalesh Babulal Date: Tue, 21 Mar 2023 09:06:16 +0000 (+0000) Subject: api: cgroup_copy_controller_values() mark settings dirty X-Git-Tag: v3.1.0~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a31a98174e2593b8cf0be2b8ee23e21ae8a84e5;p=thirdparty%2Flibcgroup.git 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 --- 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;