Skip to content

Commit

Permalink
lift file_*_write out of do_splice_direct()
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 Jun 29, 2013
1 parent 500368f commit 50cd2c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,9 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
if (in.file->f_flags & O_NONBLOCK)
fl = SPLICE_F_NONBLOCK;
#endif
file_start_write(out.file);
retval = do_splice_direct(in.file, &pos, out.file, &out_pos, count, fl);
file_end_write(out.file);

if (retval > 0) {
add_rchar(current, retval);
Expand Down
2 changes: 0 additions & 2 deletions fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,11 +1303,9 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
};
long ret;

file_start_write(out);
ret = splice_direct_to_actor(in, &sd, direct_splice_actor);
if (ret > 0)
*ppos = sd.pos;
file_end_write(out);

return ret;
}
Expand Down

0 comments on commit 50cd2c5

Please sign in to comment.