summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-23 20:07:11 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-06-29 12:57:08 +0400
commit500368f7fbdd888038d3dda579823e9515f63a3b (patch)
treee6febb210138b29bfce24562802e1ebad1889a23 /fs
parentbc77daa783afcc56004d4ed3582983b234e01872 (diff)
downloadlinux-500368f7fbdd888038d3dda579823e9515f63a3b.tar.bz2
lift file_*_write out of do_splice_from()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/splice.c9
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,
else
splice_write = default_file_splice_write;
- file_start_write(out);
- ret = splice_write(pipe, out, ppos, len, flags);
- file_end_write(out);
- return ret;
+ return splice_write(pipe, out, ppos, len, flags);
}
/*
@@ -1306,9 +1303,11 @@ 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;
}
@@ -1361,7 +1360,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
offset = out->f_pos;
}
+ file_start_write(out);
ret = do_splice_from(ipipe, out, &offset, len, flags);
+ file_end_write(out);
if (!off_out)
out->f_pos = offset;