summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-20 13:19:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:12:57 -0400
commit17338fccb28ec38097041074dcdc2016df538290 (patch)
tree40bee44b0c591bead2140df49a0c1736037a8585 /fs
parent03d95eb2f2578083a3f6286262e1cb5d88a00c02 (diff)
lift sb_start_write into default_file_splice_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-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,
loff_t tmp = sd->pos;
data = buf->ops->map(pipe, buf, 0);
- file_start_write(sd->u.file);
ret = __kernel_write(sd->u.file, data + buf->offset, sd->len, &tmp);
- file_end_write(sd->u.file);
buf->ops->unmap(pipe, buf, data);
return ret;
@@ -1066,7 +1064,9 @@ static ssize_t default_file_splice_write(struct pipe_inode_info *pipe,
{
ssize_t ret;
+ file_start_write(out);
ret = splice_from_pipe(pipe, out, ppos, len, flags, write_pipe_buf);
+ file_end_write(out);
if (ret > 0)
*ppos += ret;