From 01fdf26d720a21820f4f51fade5f8b156948403b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 18 Jan 2014 22:12:35 +0000 Subject: [PATCH] io.c: remove socket check for sendfile Linux uses splice internally for sendfile since 2.6.23, allowing sendfile to work for arbitrary destinations. We gracefully handle EINVAL/ENOSYS from sendfile anyways, so we will hit the old fallback to read/write if the system cannot perform sendfile to non-sockets. --- io.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/io.c b/io.c index 6bab4f9..00f9abc 100644 --- a/io.c +++ b/io.c @@ -10062,8 +10062,6 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp) stp->error_no = errno; return -1; } - if ((dst_stat.st_mode & S_IFMT) != S_IFSOCK) - return 0; src_offset = stp->src_offset; use_pread = src_offset != (off_t)-1; -- 1.8.5.2.193.g2394e94