Skip to content

Commit 2357eab

Browse files
authored
Merge pull request #3233 from kolyshkin/hugepage-fix
libct/cg/fs2: fix GetStats for unsupported hugetlb
2 parents a5a45c7 + 916c6a1 commit 2357eab

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

libcontainer/cgroups/fs2/hugetlb.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package fs2
22

33
import (
4-
"fmt"
54
"strconv"
65

76
"github.com/opencontainers/runc/libcontainer/cgroups"
@@ -27,10 +26,7 @@ func setHugeTlb(dirPath string, r *configs.Resources) error {
2726
}
2827

2928
func statHugeTlb(dirPath string, stats *cgroups.Stats) error {
30-
hugePageSizes, err := cgroups.GetHugePageSize()
31-
if err != nil {
32-
return fmt.Errorf("failed to fetch hugetlb info: %w", err)
33-
}
29+
hugePageSizes, _ := cgroups.GetHugePageSize()
3430
hugetlbStats := cgroups.HugetlbStats{}
3531

3632
for _, pagesize := range hugePageSizes {

0 commit comments

Comments
 (0)