mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
swarm/fuse: lock around minfo (#393)
This commit is contained in:
parent
a715a46bf6
commit
5f33e9a8f2
1 changed files with 2 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ func mountDir(t *testing.T, api *api.Api, files map[string]fileInfo, bzzHash str
|
||||||
found := false
|
found := false
|
||||||
mi := swarmfs.Listmounts()
|
mi := swarmfs.Listmounts()
|
||||||
for _, minfo := range mi {
|
for _, minfo := range mi {
|
||||||
|
minfo.lock.RLock()
|
||||||
if minfo.MountPoint == mountDir {
|
if minfo.MountPoint == mountDir {
|
||||||
if minfo.StartManifest != bzzHash ||
|
if minfo.StartManifest != bzzHash ||
|
||||||
minfo.LatestManifest != bzzHash ||
|
minfo.LatestManifest != bzzHash ||
|
||||||
|
|
@ -108,6 +109,7 @@ func mountDir(t *testing.T, api *api.Api, files map[string]fileInfo, bzzHash str
|
||||||
}
|
}
|
||||||
found = true
|
found = true
|
||||||
}
|
}
|
||||||
|
minfo.lock.RUnlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test listMounts
|
// Test listMounts
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue