]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: adhere to boolean return 3378/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 13 Apr 2020 12:39:18 +0000 (14:39 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 13 Apr 2020 12:39:18 +0000 (14:39 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 522eb412d70f17ad97062310b300ee24590edb09..a6ee6875e3e364c0e2724240b9f01f9105d712c7 100644 (file)
@@ -1194,11 +1194,9 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
                 * line, which is not possible once a subdirectory has been
                 * created.
                 */
-               if (string_in_list(h->controllers, "devices")) {
-                       ret = ops->setup_limits_legacy(ops, conf, true);
-                       if (ret < 0)
-                               return ret;
-               }
+               if (string_in_list(h->controllers, "devices") &&
+                   !ops->setup_limits_legacy(ops, conf, true))
+                       return log_error(false, "Failed to setup legacy device limits");
        }
 
        ret = mkdir_eexist_on_last(path, 0755);