1 From ad27a46d8c0e180f71b4606d7b2a3bd3bebd7bbf Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
3 Date: Thu, 13 Oct 2016 13:42:30 +0200
4 Subject: [PATCH] api.c: preserve dirty flag when copying controller values
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 When setting cgroup parameters with cgset fails, no error is reported.
10 This is caused by the fact that cgroup_copy_controller_values is not
11 preserving dirty flags of the values, so it's making all errors
14 Signed-off-by: Nikola Forró <nforro@redhat.com>
17 1 file changed, 1 insertion(+)
19 diff --git a/src/api.c b/src/api.c
20 index 0bf0615..daf4ef0 100644
23 @@ -1687,6 +1687,7 @@ static int cgroup_copy_controller_values(struct cgroup_controller *dst,
24 dst_val = dst->values[i];
25 strncpy(dst_val->value, src_val->value, CG_VALUE_MAX);
26 strncpy(dst_val->name, src_val->name, FILENAME_MAX);
27 + dst_val->dirty = src_val->dirty;