Skip to content

Commit

Permalink
lift sb_start_write into default_file_splice_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 9, 2013
1 parent 03d95eb commit 17338fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 17338fc

Please sign in to comment.