Message ID | 1591109733-14159-1-git-send-email-pooja.trivedi@stackpath.com |
---|---|
State | New |
Headers | show |
--- a/fs/splice.c +++ b/fs/splice.c @@ -980,10 +980,12 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, * If this is the last data and SPLICE_F_MORE was not set * initially, clears it. */ - if (read_len < len) - sd->flags |= SPLICE_F_MORE; - else if (!more) + if (read_len < len) { + if (pos < i_size_read(file_inode(in))) + sd->flags |= SPLICE_F_MORE; + } else if (!more) sd->flags &= ~SPLICE_F_MORE; + } Sending a followup patch to this that adds a selftest