aboutsummaryrefslogtreecommitdiffstats
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)
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,
1000 }; 1000 };
1001 ssize_t ret; 1001 ssize_t ret;
1002 1002
1003 sb_start_write(inode->i_sb);
1004
1005 pipe_lock(pipe); 1003 pipe_lock(pipe);
1006 1004
1007 splice_from_pipe_begin(&sd); 1005 splice_from_pipe_begin(&sd);
@@ -1037,7 +1035,6 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
1037 *ppos += ret; 1035 *ppos += ret;
1038 balance_dirty_pages_ratelimited(mapping); 1036 balance_dirty_pages_ratelimited(mapping);
1039 } 1037 }
1040 sb_end_write(inode->i_sb);
1041 1038
1042 return ret; 1039 return ret;
1043} 1040}
@@ -1064,9 +1061,7 @@ static ssize_t default_file_splice_write(struct pipe_inode_info *pipe,
1064{ 1061{
1065 ssize_t ret; 1062 ssize_t ret;
1066 1063
1067 file_start_write(out);
1068 ret = splice_from_pipe(pipe, out, ppos, len, flags, write_pipe_buf); 1064 ret = splice_from_pipe(pipe, out, ppos, len, flags, write_pipe_buf);
1069 file_end_write(out);
1070 if (ret > 0) 1065 if (ret > 0)
1071 *ppos += ret; 1066 *ppos += ret;
1072 1067
@@ -1119,7 +1114,10 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
1119 else 1114 else
1120 splice_write = default_file_splice_write; 1115 splice_write = default_file_splice_write;
1121 1116
1122 return splice_write(pipe, out, ppos, len, flags); 1117 file_start_write(out);
1118 ret = splice_write(pipe, out, ppos, len, flags);
1119 file_end_write(out);
1120 return ret;
1123} 1121}
1124 1122
1125/* 1123/*