Blame SOURCES/0595-core-fix-the-reversed-sanity-check-when-setting-Star.patch

17b0f1
From 468004bfb6efeef42b9191ee218304f0ab492654 Mon Sep 17 00:00:00 2001
17b0f1
From: Tejun Heo <htejun@fb.com>
17b0f1
Date: Mon, 23 May 2016 16:48:46 -0400
17b0f1
Subject: [PATCH] core: fix the reversed sanity check when setting
17b0f1
 StartupBlockIOWeight over dbus
17b0f1
17b0f1
bus_cgroup_set_property() was rejecting if the input value was in range.
17b0f1
Reverse it.
17b0f1
17b0f1
Cherry-picked from: 6fb09269769634df1096663ce90fac47585eb63a
17b0f1
Resolves: #1302305
17b0f1
---
17b0f1
 src/core/dbus-cgroup.c | 2 +-
17b0f1
 1 file changed, 1 insertion(+), 1 deletion(-)
17b0f1
17b0f1
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
17b0f1
index ffeeb5aa9a..66b1324fe9 100644
17b0f1
--- a/src/core/dbus-cgroup.c
17b0f1
+++ b/src/core/dbus-cgroup.c
17b0f1
@@ -324,7 +324,7 @@ int bus_cgroup_set_property(
17b0f1
                 if (r < 0)
17b0f1
                         return r;
17b0f1
 
17b0f1
-                if (CGROUP_BLKIO_WEIGHT_IS_OK(weight))
17b0f1
+                if (!CGROUP_BLKIO_WEIGHT_IS_OK(weight))
17b0f1
                         return sd_bus_error_set_errnof(error, EINVAL, "StartupBlockIOWeight value out of range");
17b0f1
 
17b0f1
                 if (mode != UNIT_CHECK) {