1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

nspawn: simplify arg_us_cgns passing

We would check the condition cg_ns_supported() twice. No functional
change.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-10-10 16:12:50 -04:00
parent f68c9dd5c6
commit ada5412039
2 changed files with 3 additions and 3 deletions

View File

@ -931,7 +931,7 @@ int mount_cgroups(
if (unified_requested >= CGROUP_UNIFIED_ALL)
return mount_unified_cgroups(dest);
else if (use_cgns && cg_ns_supported())
else if (use_cgns)
return mount_legacy_cgns_supported(unified_requested, userns, uid_shift, uid_range, selinux_apifs_context);
return mount_legacy_cgns_unsupported(dest, unified_requested, userns, uid_shift, uid_range, selinux_apifs_context);

View File

@ -2724,7 +2724,7 @@ static int inner_child(
arg_uid_shift,
arg_uid_range,
arg_selinux_apifs_context,
arg_use_cgns);
true);
if (r < 0)
return r;
} else {
@ -3136,7 +3136,7 @@ static int outer_child(
arg_uid_shift,
arg_uid_range,
arg_selinux_apifs_context,
arg_use_cgns);
false);
if (r < 0)
return r;
}