From 35976f14ba34bc7112e90f0ee1cf75fd2fcc912a Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sun, 6 Jan 2013 18:21:49 +0000 Subject: [PATCH] --- yaml --- r: 348401 b: refs/heads/master c: ae62ca7b03217be5e74759dc6d7698c95df498b3 h: refs/heads/master i: 348399: ec991295b279c323d6e1be8e3d5dcc03c8fee10e v: v3 --- [refs] | 2 +- trunk/fs/splice.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e4040409ba7d..687eb33263c4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9dd4a13a89d7c27e51cb87b9e95e82d8999826da +refs/heads/master: ae62ca7b03217be5e74759dc6d7698c95df498b3 diff --git a/trunk/fs/splice.c b/trunk/fs/splice.c index 8890604e3fcd..6909d89d0da5 100644 --- a/trunk/fs/splice.c +++ b/trunk/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); }