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
1d3b2589d7
commit
13a5703d85
|
@ -124,11 +124,15 @@ func Freeze(c *cgroups.Cgroup, state cgroups.FreezerState) error {
|
|||
return err
|
||||
}
|
||||
|
||||
freezer := subsystems["freezer"]
|
||||
err = freezer.Set(d)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.Freezer = state
|
||||
|
||||
freezer := subsystems["freezer"]
|
||||
|
||||
return freezer.Set(d)
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetPids(c *cgroups.Cgroup) ([]int, error) {
|
||||
|
|
Loading…
Reference in New Issue