diff options
Diffstat (limited to 'vendor/github.com/containerd/cgroups/freezer.go')
-rw-r--r-- | vendor/github.com/containerd/cgroups/freezer.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/vendor/github.com/containerd/cgroups/freezer.go b/vendor/github.com/containerd/cgroups/freezer.go index f53430b51..0beefc6ea 100644 --- a/vendor/github.com/containerd/cgroups/freezer.go +++ b/vendor/github.com/containerd/cgroups/freezer.go @@ -26,16 +26,10 @@ func (f *freezerController) Path(path string) string { } func (f *freezerController) Freeze(path string) error { - if err := f.changeState(path, Frozen); err != nil { - return err - } return f.waitState(path, Frozen) } func (f *freezerController) Thaw(path string) error { - if err := f.changeState(path, Thawed); err != nil { - return err - } return f.waitState(path, Thawed) } @@ -57,6 +51,9 @@ func (f *freezerController) state(path string) (State, error) { func (f *freezerController) waitState(path string, state State) error { for { + if err := f.changeState(path, state); err != nil { + return err + } current, err := f.state(path) if err != nil { return err |