summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-13 19:23:01 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-13 19:23:01 -0800
commit93c222c0e126c1c24ac454acf013f2c85e57bd8b (patch)
tree920c429de92857aaf74e64a0f4f9fbaec7032fcf /fs/splice.c
parentf89c2b39ce676cb08b6ed8848cde76dcb21cc672 (diff)
parent9f9499ae8e6415cefc4fe0a96ad0e27864353c89 (diff)
Merge 4.4-rc5 into staging-next
We want those fixes in here for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 801c21cd77fe..4cf700d50b40 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -809,6 +809,13 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des
*/
static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
{
+ /*
+ * Check for signal early to make process killable when there are
+ * always buffers available
+ */
+ if (signal_pending(current))
+ return -ERESTARTSYS;
+
while (!pipe->nrbufs) {
if (!pipe->writers)
return 0;
@@ -884,6 +891,7 @@ ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, struct splice_desc *sd,
splice_from_pipe_begin(sd);
do {
+ cond_resched();
ret = splice_from_pipe_next(pipe, sd);
if (ret > 0)
ret = splice_from_pipe_feed(pipe, sd, actor);