diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/splice.c b/fs/splice.c index 6b485b8753bd..e6b25598c8c4 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -219,7 +219,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe, | |||
219 | page_nr++; | 219 | page_nr++; |
220 | ret += buf->len; | 220 | ret += buf->len; |
221 | 221 | ||
222 | if (pipe->inode) | 222 | if (pipe->files) |
223 | do_wakeup = 1; | 223 | do_wakeup = 1; |
224 | 224 | ||
225 | if (!--spd->nr_pages) | 225 | if (!--spd->nr_pages) |
@@ -829,7 +829,7 @@ int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_desc *sd, | |||
829 | ops->release(pipe, buf); | 829 | ops->release(pipe, buf); |
830 | pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1); | 830 | pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1); |
831 | pipe->nrbufs--; | 831 | pipe->nrbufs--; |
832 | if (pipe->inode) | 832 | if (pipe->files) |
833 | sd->need_wakeup = true; | 833 | sd->need_wakeup = true; |
834 | } | 834 | } |
835 | 835 | ||
@@ -1001,8 +1001,6 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, | |||
1001 | }; | 1001 | }; |
1002 | ssize_t ret; | 1002 | ssize_t ret; |
1003 | 1003 | ||
1004 | sb_start_write(inode->i_sb); | ||
1005 | |||
1006 | pipe_lock(pipe); | 1004 | pipe_lock(pipe); |
1007 | 1005 | ||
1008 | splice_from_pipe_begin(&sd); | 1006 | splice_from_pipe_begin(&sd); |
@@ -1038,7 +1036,6 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, | |||
1038 | *ppos += ret; | 1036 | *ppos += ret; |
1039 | balance_dirty_pages_ratelimited(mapping); | 1037 | balance_dirty_pages_ratelimited(mapping); |
1040 | } | 1038 | } |
1041 | sb_end_write(inode->i_sb); | ||
1042 | 1039 | ||
1043 | return ret; | 1040 | return ret; |
1044 | } | 1041 | } |
@@ -1118,7 +1115,10 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, | |||
1118 | else | 1115 | else |
1119 | splice_write = default_file_splice_write; | 1116 | splice_write = default_file_splice_write; |
1120 | 1117 | ||
1121 | return splice_write(pipe, out, ppos, len, flags); | 1118 | file_start_write(out); |
1119 | ret = splice_write(pipe, out, ppos, len, flags); | ||
1120 | file_end_write(out); | ||
1121 | return ret; | ||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | /* | 1124 | /* |
@@ -1184,7 +1184,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, | |||
1184 | */ | 1184 | */ |
1185 | pipe = current->splice_pipe; | 1185 | pipe = current->splice_pipe; |
1186 | if (unlikely(!pipe)) { | 1186 | if (unlikely(!pipe)) { |
1187 | pipe = alloc_pipe_info(NULL); | 1187 | pipe = alloc_pipe_info(); |
1188 | if (!pipe) | 1188 | if (!pipe) |
1189 | return -ENOMEM; | 1189 | return -ENOMEM; |
1190 | 1190 | ||