cgfsng: improve loggin on monitor cgroup destroy

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-10-10 00:03:13 +02:00
parent 23e5c04580
commit d5fc4dd406
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -1175,8 +1175,10 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
*chop = '\0';
ret = mkdir_p(pivot_path, 0755);
if (ret < 0 && errno != EEXIST)
if (ret < 0 && errno != EEXIST) {
SYSWARN("Failed to create cgroup \"%s\"\n", pivot_path);
goto next;
}
if (chop)
*chop = '/';
@ -1185,8 +1187,10 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
* cgroup.
*/
ret = lxc_write_to_file(pivot_path, pidstr, len, false, 0666);
if (ret != 0)
if (ret != 0) {
SYSWARN("Failed to move monitor %s to \"%s\"\n", pidstr, pivot_path);
goto next;
}
ret = recursive_destroy(h->monitor_full_path);
if (ret < 0)