statfs sample: add missing locking

geesefs-0-30-9
Michael Stapelberg 2021-06-06 20:54:41 +02:00
parent e78223ecee
commit fac69e018f
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ func dirAttrs() fuseops.InodeAttributes {
} }
func (fs *statFS) fileAttrs() fuseops.InodeAttributes { func (fs *statFS) fileAttrs() fuseops.InodeAttributes {
fs.mu.Lock()
defer fs.mu.Unlock()
return fs.cannedStatResponse return fs.cannedStatResponse
} }