summaryrefslogtreecommitdiff
path: root/fs/splice.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-20 13:21:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:12:57 -0400
commit2dd8c9ad376ccc5d2980b38e96372a8e252ae8d0 (patch)
tree82501beac2a66867f418b9a70ed416e60a22dc04 /fs/splice.c
parent17338fccb28ec38097041074dcdc2016df538290 (diff)
downloadlwn-2dd8c9ad376ccc5d2980b38e96372a8e252ae8d0.tar.gz
lwn-2dd8c9ad376ccc5d2980b38e96372a8e252ae8d0.zip
lift sb_start_write out of ->splice_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 17d7323bc2c5..7efc2f5057fb 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1000,8 +1000,6 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
};
ssize_t ret;
- sb_start_write(inode->i_sb);
-
pipe_lock(pipe);
splice_from_pipe_begin(&sd);
@@ -1037,7 +1035,6 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
*ppos += ret;
balance_dirty_pages_ratelimited(mapping);
}
- sb_end_write(inode->i_sb);
return ret;
}
@@ -1064,9 +1061,7 @@ 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;
@@ -1119,7 +1114,10 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
else
splice_write = default_file_splice_write;
- return splice_write(pipe, out, ppos, len, flags);
+ file_start_write(out);
+ ret = splice_write(pipe, out, ppos, len, flags);
+ file_end_write(out);
+ return ret;
}
/*