Prevent DATA RACE in UnstableAttr.

The slaveInodeOperations is currently copying the object when
truncate is called (which is a no-op). This may result in a
(unconsequential) data race when being modified concurrently.

PiperOrigin-RevId: 294484276
This commit is contained in:
Adin Scannell
2020-02-11 11:38:08 -08:00
committed by gVisor bot
parent 762e4761cc
commit 115898e368
+1 -1
View File
@@ -73,7 +73,7 @@ func (si *slaveInodeOperations) Release(ctx context.Context) {
}
// Truncate implements fs.InodeOperations.Truncate.
func (slaveInodeOperations) Truncate(context.Context, *fs.Inode, int64) error {
func (*slaveInodeOperations) Truncate(context.Context, *fs.Inode, int64) error {
return nil
}