Skip to content

Commit

Permalink
Merge branch 'containerd:main' into cpu-max-burst
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-jacques authored Dec 17, 2024
2 parents 5ed586d + bce3c7e commit 6fe1306
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cgroup2/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,6 @@ func (c *Manager) fallbackKill() error {
}

func (c *Manager) Delete() error {
var (
tasks []uint64
threaded bool
)
// Kernel prevents cgroups with running process from being removed,
// check the tree is empty.
//
Expand All @@ -485,13 +481,13 @@ func (c *Manager) Delete() error {
if !os.IsNotExist(err) {
return err
}
} else {
threaded = cgType == Threaded
}

if threaded {
var tasks []uint64
switch cgType {
case Threaded, DomainThreaded:
tasks, err = c.Threads(true)
} else {
default:
tasks, err = c.Procs(true)
}
if err != nil {
Expand Down

0 comments on commit 6fe1306

Please sign in to comment.