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-17 13:42:58 +01:00
parent d7c9693a3e
commit bf516294c8
1 changed files with 4 additions and 4 deletions

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");