mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Do not hold metadataMu on gofer O_DIRECT read path.
dentry.writeback() takes dataMu when it needs to. This lock seems to be unnecessary. PiperOrigin-RevId: 548763586
This commit is contained in:
@@ -141,10 +141,6 @@ func (fd *regularFileFD) PRead(ctx context.Context, dst usermem.IOSequence, offs
|
||||
readErr error
|
||||
)
|
||||
if fd.vfsfd.StatusFlags()&linux.O_DIRECT != 0 {
|
||||
// Lock d.metadataMu for the rest of the read to prevent d.size from
|
||||
// changing.
|
||||
d.metadataMu.Lock()
|
||||
defer d.metadataMu.Unlock()
|
||||
// Write dirty cached pages that will be touched by the read back to
|
||||
// the remote file.
|
||||
if err := d.writeback(ctx, offset, dst.NumBytes()); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user