From 93df3010482ad52e5ada2e416c996005da956e1e Mon Sep 17 00:00:00 2001 From: Masaki Matsushita Date: Sat, 29 Aug 2020 15:38:07 +0900 Subject: IO.copy_stream: handle ENOTSUP on copy_file_range(2) fallback to other methods on ENOTSUP. some RedHat kernels may return ENOTSUP on an NFS mount. [Feature #16965] --- io.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/io.c b/io.c index 5e4fdd5d95..3b3ce3ff82 100644 --- a/io.c +++ b/io.c @@ -11311,6 +11311,11 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp) case EINVAL: #ifdef ENOSYS case ENOSYS: +#endif +#ifdef ENOTSUP + /* some RedHat kernels may return ENOTSUP on an NFS mount. + see also: [Feature #16965] */ + case ENOTSUP: #endif return 0; case EAGAIN: -- cgit v1.2.3