Message ID | 1358197093-17823-1-git-send-email-herton.krzesinski@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/splice.c b/fs/splice.c index 7bf08fa..6cb3acb 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); }