Skip to content

Commit ce9c6dd

Browse files
authored
Merge pull request #330 from slp/docker-1.13.1-rhel
Remove path from counter when count becomes <= 0
2 parents 9e82212 + 2f468e6 commit ce9c6dd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

daemon/graphdriver/counter.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ func (c *RefCounter) Decrement(path string) int {
6262
}
6363
}
6464
m.count--
65+
count := m.count
66+
if count <= 0 {
67+
delete(c.counts, path)
68+
}
6569
c.mu.Unlock()
6670
return m.count
6771
}

0 commit comments

Comments
 (0)