mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
nspawn: minor optimization
no need to prepare the target path if we quite the loop anyway one step later.
This commit is contained in:
parent
d7c9693a3e
commit
bf516294c8
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user