Skip to content

Commit

Permalink
Ensure parents have value
Browse files Browse the repository at this point in the history
  • Loading branch information
Furisto committed Jun 9, 2021
1 parent ca3e9f2 commit b9ae5b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cgroups/v1/cpuset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ impl Controller for CpuSet {
log::debug!("Apply CpuSet cgroup config");
fs::create_dir_all(cgroup_path)?;

Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_CPUS)?;
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_MEMS)?;

if let Some(cpuset) = &linux_resources.cpu {
Self::apply(cgroup_path, cpuset)?;
}

Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_CPUS)?;
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_MEMS)?;

common::write_cgroup_file(cgroup_path.join(CGROUP_PROCS), pid)?;
Ok(())
}
Expand Down

0 comments on commit b9ae5b7

Please sign in to comment.