Fix a few data races when reading files in mount (#3527)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package mount
|
||||
|
||||
import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
"sync"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||
)
|
||||
|
||||
type FileHandleToInode struct {
|
||||
@@ -49,7 +50,9 @@ func (i *FileHandleToInode) AcquireFileHandle(wfs *WFS, inode uint64, entry *fil
|
||||
} else {
|
||||
fh.counter++
|
||||
}
|
||||
fh.entry = entry
|
||||
if fh.entry != entry {
|
||||
fh.SetEntry(entry)
|
||||
}
|
||||
return fh
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user