nspawn: minor optimization

no need to prepare the target path if we quite the loop anyway one step
later.
This commit is contained in:
Lennart Poettering
2017-11-21 11:54:08 +01:00
parent d7c9693a3e
commit bf516294c8
+4 -4
View File
@@ -1038,13 +1038,13 @@ static int mount_legacy_cgns_supported(
if (r == 0)
break;
target = prefix_root("/sys/fs/cgroup", tok);
if (!target)
return log_oom();
if (streq(controller, tok))
break;
target = prefix_root("/sys/fs/cgroup/", tok);
if (!target)
return log_oom();
r = symlink_idempotent(controller, target);
if (r == -EINVAL)
return log_error_errno(r, "Invalid existing symlink for combined hierarchy: %m");