diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2015-12-17 14:57:46 +0100 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2015-12-17 14:57:46 +0100 |
| commit | 4dccc93f1e7f4e2fd92a48c40a7ac9211a029352 (patch) | |
| tree | 717a183f0dba200a882126cf095f38e319302c51 /fs/splice.c | |
| parent | d4eed63bb8a3749a6cf19bbc98c943fafb4a826d (diff) | |
| parent | 9f9499ae8e6415cefc4fe0a96ad0e27864353c89 (diff) | |
Merge tag 'v4.4-rc5' into devel
Linux 4.4-rc5
Diffstat (limited to 'fs/splice.c')
| -rw-r--r-- | fs/splice.c | 8 |
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); |
