Merge pull request #3233 from kolyshkin/hugepage-fix

libct/cg/fs2: fix GetStats for unsupported hugetlb
This commit is contained in:
Akihiro Suda
2021-10-12 12:20:51 +09:00
committed by GitHub
+1 -5
View File
@@ -1,7 +1,6 @@
package fs2
import (
"fmt"
"strconv"
"github.com/opencontainers/runc/libcontainer/cgroups"
@@ -27,10 +26,7 @@ func setHugeTlb(dirPath string, r *configs.Resources) error {
}
func statHugeTlb(dirPath string, stats *cgroups.Stats) error {
hugePageSizes, err := cgroups.GetHugePageSize()
if err != nil {
return fmt.Errorf("failed to fetch hugetlb info: %w", err)
}
hugePageSizes, _ := cgroups.GetHugePageSize()
hugetlbStats := cgroups.HugetlbStats{}
for _, pagesize := range hugePageSizes {