mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Make masterInodeOperations.Truncate take a pointer receiver.
Otherwise a copy happens, which triggers a data race when reading masterInodeOperations.SimpleFileOperations.uattr, which must be accessed with a lock held. PiperOrigin-RevId: 286464473
This commit is contained in:
committed by
gVisor bot
parent
57ce26c0b4
commit
bb00438f36
@@ -77,7 +77,7 @@ func (mi *masterInodeOperations) Release(ctx context.Context) {
|
||||
}
|
||||
|
||||
// Truncate implements fs.InodeOperations.Truncate.
|
||||
func (masterInodeOperations) Truncate(context.Context, *fs.Inode, int64) error {
|
||||
func (*masterInodeOperations) Truncate(context.Context, *fs.Inode, int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user