cgroups: don't change a freezer state if an operation failed
Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
parent
083d91f8c3
commit
4eaff5e14e
|
@ -143,11 +143,15 @@ func (m *Manager) Freeze(state cgroups.FreezerState) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
freezer := subsystems["freezer"]
|
||||||
|
err = freezer.Set(d)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
m.Cgroups.Freezer = state
|
m.Cgroups.Freezer = state
|
||||||
|
|
||||||
freezer := subsystems["freezer"]
|
return nil
|
||||||
|
|
||||||
return freezer.Set(d)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Manager) GetPids() ([]int, error) {
|
func (m *Manager) GetPids() ([]int, error) {
|
||||||
|
|
Loading…
Reference in New Issue