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
|
||||
}
|
||||
|
||||
freezer := subsystems["freezer"]
|
||||
err = freezer.Set(d)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
m.Cgroups.Freezer = state
|
||||
|
||||
freezer := subsystems["freezer"]
|
||||
|
||||
return freezer.Set(d)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Manager) GetPids() ([]int, error) {
|
||||
|
|
Loading…
Reference in New Issue