diff --git a/vfs/mem_fs.go b/vfs/mem_fs.go index bcd799b8c43..62c8e208649 100644 --- a/vfs/mem_fs.go +++ b/vfs/mem_fs.go @@ -99,11 +99,11 @@ func (y *MemFS) String() string { // SetIgnoreSyncs sets the MemFS.ignoreSyncs field. See the usage comment with NewStrictMem() for // details. func (y *MemFS) SetIgnoreSyncs(ignoreSyncs bool) { - y.mu.Lock() if !y.strict { // noop return } + y.mu.Lock() y.ignoreSyncs = ignoreSyncs y.mu.Unlock() }