From 73cc5bae519580a762fe9bf7e37d9a06424b1207 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Mon, 12 Jun 2017 14:37:58 +0530 Subject: [PATCH] Colocate defer statements near relevant functions Signed-off-by: Goutham Veeramachaneni --- head.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/head.go b/head.go index 4dfdd5b86b..ffbdf5ea4e 100644 --- a/head.go +++ b/head.go @@ -529,8 +529,8 @@ func (a *headAppender) createSeries() error { base0 := len(a.series) a.mtx.RUnlock() - a.mtx.Lock() defer a.mtx.RLock() + a.mtx.Lock() defer a.mtx.Unlock() base1 := len(a.series)