From 874a502b1deea1019dab23e2b5ead9c792925e40 Mon Sep 17 00:00:00 2001 From: Alfred Landrum Date: Fri, 3 Feb 2017 08:47:55 -0800 Subject: [PATCH] Fix RefCounter count return Signed-off-by: Alfred Landrum --- daemon/graphdriver/counter.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/graphdriver/counter.go b/daemon/graphdriver/counter.go index 5ea604f5b6..b1cf953c7e 100644 --- a/daemon/graphdriver/counter.go +++ b/daemon/graphdriver/counter.go @@ -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 @@ -62,6 +63,7 @@ func (c *RefCounter) Decrement(path string) int { } } m.count-- + count := m.count c.mu.Unlock() - return m.count + return count }