Message ID | 20220507215232.065C6C385A6@smtp.kernel.org |
---|---|
State | New |
Headers | show |
Series | + fs-sendfile-handles-o_nonblock-of-out_fd.patch added to mm-nonmm-unstable branch | expand |
--- a/fs/read_write.c~fs-sendfile-handles-o_nonblock-of-out_fd +++ a/fs/read_write.c @@ -1247,6 +1247,9 @@ static ssize_t do_sendfile(int out_fd, i count, fl); file_end_write(out.file); } else { + if (out.file->f_flags & O_NONBLOCK) + fl |= SPLICE_F_NONBLOCK; + retval = splice_file_to_pipe(in.file, opipe, &pos, count, fl); }