Merge pull request #1042 from datawolf/out-of-loop
move m.GetPaths out of the loop
This commit is contained in:
commit
51c11a89f7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue