Skip to content

Commit

Permalink
Merge pull request #3233 from kolyshkin/hugepage-fix
Browse files Browse the repository at this point in the history
libct/cg/fs2: fix GetStats for unsupported hugetlb
  • Loading branch information
AkihiroSuda authored Oct 12, 2021
2 parents a5a45c7 + 916c6a1 commit 2357eab
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libcontainer/cgroups/fs2/hugetlb.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package fs2

import (
"fmt"
"strconv"

"github.com/opencontainers/runc/libcontainer/cgroups"
Expand All @@ -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 {
Expand Down

0 comments on commit 2357eab

Please sign in to comment.