diff options
-rw-r--r-- | fs/read_write.c | 2 | ||||
-rw-r--r-- | fs/splice.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 2cefa417be34..abca7437d192 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -1129,7 +1129,9 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos, | |||
1129 | if (in.file->f_flags & O_NONBLOCK) | 1129 | if (in.file->f_flags & O_NONBLOCK) |
1130 | fl = SPLICE_F_NONBLOCK; | 1130 | fl = SPLICE_F_NONBLOCK; |
1131 | #endif | 1131 | #endif |
1132 | file_start_write(out.file); | ||
1132 | retval = do_splice_direct(in.file, &pos, out.file, &out_pos, count, fl); | 1133 | retval = do_splice_direct(in.file, &pos, out.file, &out_pos, count, fl); |
1134 | file_end_write(out.file); | ||
1133 | 1135 | ||
1134 | if (retval > 0) { | 1136 | if (retval > 0) { |
1135 | add_rchar(current, retval); | 1137 | add_rchar(current, retval); |
diff --git a/fs/splice.c b/fs/splice.c index fed5134f761c..78b3d12046e7 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1303,11 +1303,9 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | |||
1303 | }; | 1303 | }; |
1304 | long ret; | 1304 | long ret; |
1305 | 1305 | ||
1306 | file_start_write(out); | ||
1307 | ret = splice_direct_to_actor(in, &sd, direct_splice_actor); | 1306 | ret = splice_direct_to_actor(in, &sd, direct_splice_actor); |
1308 | if (ret > 0) | 1307 | if (ret > 0) |
1309 | *ppos = sd.pos; | 1308 | *ppos = sd.pos; |
1310 | file_end_write(out); | ||
1311 | 1309 | ||
1312 | return ret; | 1310 | return ret; |
1313 | } | 1311 | } |