diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/splice.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/splice.c b/fs/splice.c index 9eca476227d5..fed5134f761c 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1115,10 +1115,7 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, | |||
1115 | else | 1115 | else |
1116 | splice_write = default_file_splice_write; | 1116 | splice_write = default_file_splice_write; |
1117 | 1117 | ||
1118 | file_start_write(out); | 1118 | return splice_write(pipe, out, ppos, len, flags); |
1119 | ret = splice_write(pipe, out, ppos, len, flags); | ||
1120 | file_end_write(out); | ||
1121 | return ret; | ||
1122 | } | 1119 | } |
1123 | 1120 | ||
1124 | /* | 1121 | /* |
@@ -1306,9 +1303,11 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | |||
1306 | }; | 1303 | }; |
1307 | long ret; | 1304 | long ret; |
1308 | 1305 | ||
1306 | file_start_write(out); | ||
1309 | ret = splice_direct_to_actor(in, &sd, direct_splice_actor); | 1307 | ret = splice_direct_to_actor(in, &sd, direct_splice_actor); |
1310 | if (ret > 0) | 1308 | if (ret > 0) |
1311 | *ppos = sd.pos; | 1309 | *ppos = sd.pos; |
1310 | file_end_write(out); | ||
1312 | 1311 | ||
1313 | return ret; | 1312 | return ret; |
1314 | } | 1313 | } |
@@ -1361,7 +1360,9 @@ static long do_splice(struct file *in, loff_t __user *off_in, | |||
1361 | offset = out->f_pos; | 1360 | offset = out->f_pos; |
1362 | } | 1361 | } |
1363 | 1362 | ||
1363 | file_start_write(out); | ||
1364 | ret = do_splice_from(ipipe, out, &offset, len, flags); | 1364 | ret = do_splice_from(ipipe, out, &offset, len, flags); |
1365 | file_end_write(out); | ||
1365 | 1366 | ||
1366 | if (!off_out) | 1367 | if (!off_out) |
1367 | out->f_pos = offset; | 1368 | out->f_pos = offset; |