X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fsplice.c;h=6909d89d0da56ffd929a2114b0228a03d1f35589;hb=e91d1694d362f065c51eb07b46b19e8b33c92777;hp=8890604e3fcdd638d6d150ffbfc981a783467dfe;hpb=a2faf2fc534f57ba26bc4d613795236ed4f5fb1c;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/splice.c b/fs/splice.c index 8890604e3fcd..6909d89d0da5 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -696,8 +696,10 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe, return -EINVAL; more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0; - if (sd->len < sd->total_len) + + if (sd->len < sd->total_len && pipe->nrbufs > 1) more |= MSG_SENDPAGE_NOTLAST; + return file->f_op->sendpage(file, buf->page, buf->offset, sd->len, &pos, more); }