Skip to content

Commit

Permalink
Merge pull request opencontainers#118 from hqhq/hq_fix_memory_cgroup
Browse files Browse the repository at this point in the history
Fix error when memory cgroup not mounted
  • Loading branch information
LK4D4 committed Jul 13, 2015
2 parents 0d12ac2 + 4e24410 commit 31f23e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libcontainer/cgroups/fs/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ type MemoryGroup struct {

func (s *MemoryGroup) Apply(d *data) error {
path, err := d.path("memory")
if err != nil && !cgroups.IsNotFound(err) {
if err != nil {
if cgroups.IsNotFound(err) {
return nil
}
return err
}
if err := os.MkdirAll(path, 0755); err != nil && !os.IsExist(err) {
Expand Down

0 comments on commit 31f23e4

Please sign in to comment.