aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/splice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/splice.c b/fs/splice.c
index e78a749064db..17d7323bc2c5 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1052,9 +1052,7 @@ static int write_pipe_buf(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
1052 loff_t tmp = sd->pos; 1052 loff_t tmp = sd->pos;
1053 1053
1054 data = buf->ops->map(pipe, buf, 0); 1054 data = buf->ops->map(pipe, buf, 0);
1055 file_start_write(sd->u.file);
1056 ret = __kernel_write(sd->u.file, data + buf->offset, sd->len, &tmp); 1055 ret = __kernel_write(sd->u.file, data + buf->offset, sd->len, &tmp);
1057 file_end_write(sd->u.file);
1058 buf->ops->unmap(pipe, buf, data); 1056 buf->ops->unmap(pipe, buf, data);
1059 1057
1060 return ret; 1058 return ret;
@@ -1066,7 +1064,9 @@ static ssize_t default_file_splice_write(struct pipe_inode_info *pipe,
1066{ 1064{
1067 ssize_t ret; 1065 ssize_t ret;
1068 1066
1067 file_start_write(out);
1069 ret = splice_from_pipe(pipe, out, ppos, len, flags, write_pipe_buf); 1068 ret = splice_from_pipe(pipe, out, ppos, len, flags, write_pipe_buf);
1069 file_end_write(out);
1070 if (ret > 0) 1070 if (ret > 0)
1071 *ppos += ret; 1071 *ppos += ret;
1072 1072