Commit 2f9c12da authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cb6b33a9
......@@ -695,8 +695,8 @@ func (bfdir *BigFileDir) lookup(out *fuse.Attr, name string, fctx *fuse.Context)
return nil, eINVALf("not oid")
}
bfdir.head.zconnMu.Lock()
defer bfdir.head.zconnMu.Unlock()
bfdir.head.zconnMu.RLock()
defer bfdir.head.zconnMu.RUnlock()
defer func() {
if f != nil {
......@@ -1080,8 +1080,8 @@ func (f *BigFile) readBlk(ctx context.Context, blk int64, dest []byte) error {
// /(head|<rev>)/at -> readAt serves read.
func (h *Head) readAt() []byte {
h.zconnMu.Lock()
defer h.zconnMu.Unlock()
h.zconnMu.RLock()
defer h.zconnMu.RUnlock()
return []byte(h.zconn.At().String())
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment