From 40712b1026f649abbbb39dea31d020438cbbb96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 10 Jun 2020 14:08:03 +0200 Subject: [PATCH] local store: Fix double RUnlock --- stores/local.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/stores/local.go b/stores/local.go index bf11a3418..55d34549b 100644 --- a/stores/local.go +++ b/stores/local.go @@ -245,7 +245,6 @@ func (st *Local) AcquireSector(ctx context.Context, sid abi.SectorID, spt abi.Re sis, err := st.index.StorageBestAlloc(ctx, fileType, spt, pathType) if err != nil { - st.localLk.RUnlock() return SectorPaths{}, SectorPaths{}, xerrors.Errorf("finding best storage for allocating : %w", err) } @@ -277,7 +276,6 @@ func (st *Local) AcquireSector(ctx context.Context, sid abi.SectorID, spt abi.Re } if best == "" { - st.localLk.RUnlock() return SectorPaths{}, SectorPaths{}, xerrors.Errorf("couldn't find a suitable path for a sector") }