]> git.proxmox.com Git - lxc.git/blob - debian/patches/pve/0008-cgroups-adhere-to-boolean-return.patch
14cfedbb925a0060fad6538af6e315e5708a54bc
[lxc.git] / debian / patches / pve / 0008-cgroups-adhere-to-boolean-return.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Christian Brauner <christian.brauner@ubuntu.com>
3 Date: Mon, 13 Apr 2020 14:39:18 +0200
4 Subject: [PATCH] cgroups: adhere to boolean return
5
6 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
7 ---
8 src/lxc/cgroups/cgfsng.c | 8 +++-----
9 1 file changed, 3 insertions(+), 5 deletions(-)
10
11 diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
12 index 303c2f6ab..56bb005de 100644
13 --- a/src/lxc/cgroups/cgfsng.c
14 +++ b/src/lxc/cgroups/cgfsng.c
15 @@ -1195,11 +1195,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
16 * line, which is not possible once a subdirectory has been
17 * created.
18 */
19 - if (string_in_list(h->controllers, "devices")) {
20 - ret = ops->setup_limits_legacy(ops, conf, true);
21 - if (ret < 0)
22 - return ret;
23 - }
24 + if (string_in_list(h->controllers, "devices") &&
25 + !ops->setup_limits_legacy(ops, conf, true))
26 + return log_error(false, "Failed to setup legacy device limits");
27 }
28
29 ret = mkdir_eexist_on_last(path, 0755);