mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-12 01:45:00 +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:
@@ -1038,13 +1038,13 @@ static int mount_legacy_cgns_supported(
|
|||||||
if (r == 0)
|
if (r == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
target = prefix_root("/sys/fs/cgroup", tok);
|
|
||||||
if (!target)
|
|
||||||
return log_oom();
|
|
||||||
|
|
||||||
if (streq(controller, tok))
|
if (streq(controller, tok))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
target = prefix_root("/sys/fs/cgroup/", tok);
|
||||||
|
if (!target)
|
||||||
|
return log_oom();
|
||||||
|
|
||||||
r = symlink_idempotent(controller, target);
|
r = symlink_idempotent(controller, target);
|
||||||
if (r == -EINVAL)
|
if (r == -EINVAL)
|
||||||
return log_error_errno(r, "Invalid existing symlink for combined hierarchy: %m");
|
return log_error_errno(r, "Invalid existing symlink for combined hierarchy: %m");
|
||||||
|
Reference in New Issue
Block a user