Merge pull request #1042 from datawolf/out-of-loop

move m.GetPaths out of the loop
This commit is contained in:
Mrunal Patel 2016-09-14 11:38:50 -07:00 committed by GitHub
commit 51c11a89f7
1 changed files with 2 additions and 1 deletions

View File

@ -195,8 +195,9 @@ func (m *Manager) Set(container *configs.Config) error {
if m.Cgroups.Paths != nil {
return nil
}
paths := m.GetPaths()
for _, sys := range subsystems {
paths := m.GetPaths()
path := paths[sys.Name()]
if err := sys.Set(path, container.Cgroups); err != nil {
return err