diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index aa150244..5b8cc993 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -1837,10 +1837,7 @@ func (c *linuxContainer) isPaused() (bool, error) { data, err := ioutil.ReadFile(filepath.Join(fcg, filename)) if err != nil { // If freezer cgroup is not mounted, the container would just be not paused. - if os.IsNotExist(err) { - return false, nil - } - if pathError, isPathError := err.(*os.PathError); isPathError && pathError.Err == syscall.ENODEV { + if os.IsNotExist(err) || errors.Unwrap(err) == syscall.ENODEV { return false, nil } return false, newSystemErrorWithCause(err, "checking if container is paused")