Skip to content

Commit fefc1d3

Browse files
committed
libcontainer: remove isPidsSet because it should always be set
Signed-off-by: Peter Hunt <[email protected]>
1 parent 670474e commit fefc1d3

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

libcontainer/cgroups/fs2/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func needAnyControllers(r *configs.Resources) (bool, error) {
3939
return ok
4040
}
4141

42-
if isPidsSet(r) && have("pids") {
42+
if have("pids") {
4343
return true, nil
4444
}
4545
if isMemorySet(r) && have("memory") {

libcontainer/cgroups/fs2/pids.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import (
1313
"github.com/opencontainers/runc/libcontainer/configs"
1414
)
1515

16-
func isPidsSet(r *configs.Resources) bool {
17-
return r.PidsLimit != 0
18-
}
19-
2016
func setPids(dirPath string, r *configs.Resources) error {
2117
if val := numToStr(r.PidsLimit); val != "" {
2218
if err := cgroups.WriteFile(dirPath, "pids.max", val); err != nil {

0 commit comments

Comments
 (0)