X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=fs%2Fsplice.c;h=de0101ab7f5882b41471d06aec5a0bbb6652ef29;hp=512be8bd3da1935880b0687350a7892530e4877b;hb=38b2b5209cd1535ff6a6d8c86080ea7d01fe71f2;hpb=8f763d95d980e12fc2aa09a561980532fc7cec47 diff --git a/fs/splice.c b/fs/splice.c index 512be8bd3da1..de0101ab7f58 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -697,8 +697,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); }