]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
api: cgroup_copy_controller_values() mark settings dirty
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 21 Mar 2023 09:06:16 +0000 (09:06 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 23 Mar 2023 18:21:12 +0000 (12:21 -0600)
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 <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/api.c

index 14f703dce88b76f8388b8ab836f1357cddf5d971..7f9e49d9e22c6cc0834dff9f9aec80f205e553c6 100644 (file)
--- 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;