diff --git a/container/libcontainer/helpers.go b/container/libcontainer/helpers.go index e030d1ad..65c72ab5 100644 --- a/container/libcontainer/helpers.go +++ b/container/libcontainer/helpers.go @@ -387,23 +387,16 @@ func toContainerStats2(s *cgroups.Stats, ret *info.ContainerStats) { ret.Memory.ContainerData.Pgmajfault = v ret.Memory.HierarchicalData.Pgmajfault = v } - if v, ok := s.MemoryStats.Stats["total_inactive_anon"]; ok { - workingSet := ret.Memory.Usage + + workingSet := ret.Memory.Usage + if v, ok := s.MemoryStats.Stats["total_inactive_file"]; ok { if workingSet < v { workingSet = 0 } else { workingSet -= v } - - if v, ok := s.MemoryStats.Stats["total_inactive_file"]; ok { - if workingSet < v { - workingSet = 0 - } else { - workingSet -= v - } - } - ret.Memory.WorkingSet = workingSet } + ret.Memory.WorkingSet = workingSet } func toContainerStats3(libcontainerStats *libcontainer.Stats, ret *info.ContainerStats) {