projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vfs: Make sendfile(2) killable even better
[linux-block.git]
/
fs
/
splice.c
diff --git
a/fs/splice.c
b/fs/splice.c
index 801c21cd77fe4f1d344aed6fa7b28369972d82b2..22adbbe51e52cef273299aca1daa8ad35f4132f0 100644
(file)
--- 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)
{
*/
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;
while (!pipe->nrbufs) {
if (!pipe->writers)
return 0;