summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2012-05-01 16:29:55 +0400
committerJens Axboe <axboe@kernel.dk>2012-05-01 16:29:55 +0400
commit0b7877d4eea3f93e3dd941999522bbd8c538cb53 (patch)
treeade6d4e411b9b9b569c802e3b2179826162c934c /fs/splice.c
parentbd1a68b59c8e3bce45fb76632c64e1e063c3962d (diff)
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
downloadlinux-0b7877d4eea3f93e3dd941999522bbd8c538cb53.tar.xz
Merge tag 'v3.4-rc5' into for-3.5/core
The core branch is behind driver commits that we want to build on for 3.5, hence I'm pulling in a later -rc. Linux 3.4-rc5 Conflicts: Documentation/feature-removal-schedule.txt Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 5417aa320dc7..406ef2b792c2 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -30,6 +30,7 @@
#include <linux/uio.h>
#include <linux/security.h>
#include <linux/gfp.h>
+#include <linux/socket.h>
/*
* Attempt to steal a page from a pipe buffer. This should perhaps go into
@@ -690,7 +691,9 @@ static int pipe_to_sendpage(struct pipe_inode_info *pipe,
if (!likely(file->f_op && file->f_op->sendpage))
return -EINVAL;
- more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len;
+ more = (sd->flags & SPLICE_F_MORE) ? MSG_MORE : 0;
+ if (sd->len < sd->total_len)
+ more |= MSG_SENDPAGE_NOTLAST;
return file->f_op->sendpage(file, buf->page, buf->offset,
sd->len, &pos, more);
}