aboutsummaryrefslogtreecommitdiff
path: root/src/internal/poll/sendfile_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/poll/sendfile_linux.go')
-rw-r--r--src/internal/poll/sendfile_linux.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/internal/poll/sendfile_linux.go b/src/internal/poll/sendfile_linux.go
index d64283007d..d6442e8666 100644
--- a/src/internal/poll/sendfile_linux.go
+++ b/src/internal/poll/sendfile_linux.go
@@ -16,6 +16,9 @@ func SendFile(dstFD *FD, src int, remain int64) (int64, error) {
return 0, err
}
defer dstFD.writeUnlock()
+ if err := dstFD.pd.prepareWrite(dstFD.isFile); err != nil {
+ return 0, err
+ }
dst := int(dstFD.Sysfd)
var written int64