Skip to content

Commit 50673b7

Browse files
committed
common/pkg/cgroups: Remove unused fs imports and handler fields
The github.com/opencontainers/cgroups/fs import and associated struct fields (Blkio, CPU, CPUSet, Mem, Pid) were never used in any of the handler implementations. These were remnants from the cgroups v1 removal. The empty handler structs are retained as they serve as method receivers for implementing the controllerHandler interface. Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent fe353d1 commit 50673b7

File tree

5 files changed

+0
-10
lines changed

5 files changed

+0
-10
lines changed

common/pkg/cgroups/blkio_linux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import (
77
"strings"
88

99
"github.com/opencontainers/cgroups"
10-
"github.com/opencontainers/cgroups/fs"
1110
)
1211

1312
type linuxBlkioHandler struct {
14-
Blkio fs.BlkioGroup
1513
}
1614

1715
func getBlkioHandler() *linuxBlkioHandler {

common/pkg/cgroups/cpu_linux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import (
66
"strconv"
77

88
"github.com/opencontainers/cgroups"
9-
"github.com/opencontainers/cgroups/fs"
109
)
1110

1211
type linuxCPUHandler struct {
13-
CPU fs.CpuGroup
1412
}
1513

1614
func getCPUHandler() *linuxCPUHandler {

common/pkg/cgroups/cpuset_linux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ package cgroups
44

55
import (
66
"github.com/opencontainers/cgroups"
7-
"github.com/opencontainers/cgroups/fs"
87
)
98

109
type linuxCpusetHandler struct {
11-
CPUSet fs.CpusetGroup
1210
}
1311

1412
func getCpusetHandler() *linuxCpusetHandler {

common/pkg/cgroups/memory_linux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import (
66
"path/filepath"
77

88
"github.com/opencontainers/cgroups"
9-
"github.com/opencontainers/cgroups/fs"
109
)
1110

1211
type linuxMemHandler struct {
13-
Mem fs.MemoryGroup
1412
}
1513

1614
func getMemoryHandler() *linuxMemHandler {

common/pkg/cgroups/pids_linux.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import (
66
"path/filepath"
77

88
"github.com/opencontainers/cgroups"
9-
"github.com/opencontainers/cgroups/fs"
109
)
1110

1211
type linuxPidHandler struct {
13-
Pid fs.PidsGroup
1412
}
1513

1614
func getPidsHandler() *linuxPidHandler {

0 commit comments

Comments
 (0)