[lxc-devel] [lxc/master] cgfsng: only output debug info when we set cgroup data

0x0916 on Github lxc-bot at linuxcontainers.org
Tue Jul 11 08:07:10 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 425 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170711/8d31f6a1/attachment.bin>
-------------- next part --------------
From 6a628f4a1e138371849ed264e06792b845af5dd6 Mon Sep 17 00:00:00 2001
From: Long Wang <w at laoqinren.net>
Date: Mon, 10 Jul 2017 11:38:33 +0800
Subject: [PATCH] cgfsng: only output debug info when we set cgroup data

Only output debug info `cgroup 'xxxx' set to 'yyyy'` when we set
cgroup data.

Signed-off-by: Long Wang <w at laoqinren.net>
---
 src/lxc/cgroups/cgfsng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index b087f9410..df7615c60 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -1979,9 +1979,8 @@ static bool cgfsng_setup_limits(void *hdata, struct lxc_list *cgroup_settings,
 				      cg->subsystem, cg->value, d->name);
 				goto out;
 			}
+			DEBUG("cgroup '%s' set to '%s'", cg->subsystem, cg->value);
 		}
-
-		DEBUG("cgroup '%s' set to '%s'", cg->subsystem, cg->value);
 	}
 
 	ret = true;


More information about the lxc-devel mailing list