Skip to content

Commit

Permalink
Merge pull request moby#30719 from alfred-landrum/gdcounter
Browse files Browse the repository at this point in the history
Fix RefCounter count return
  • Loading branch information
LK4D4 authored Feb 3, 2017
2 parents c3b660b + 874a502 commit 70dc4cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daemon/graphdriver/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ func (c *RefCounter) Increment(path string) int {
}
}
m.count++
count := m.count
c.mu.Unlock()
return m.count
return count
}

// Decrement decreases the ref count for the given id and returns the current count
Expand All @@ -62,6 +63,7 @@ func (c *RefCounter) Decrement(path string) int {
}
}
m.count--
count := m.count
c.mu.Unlock()
return m.count
return count
}

0 comments on commit 70dc4cd

Please sign in to comment.