diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-20 17:58:11 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-05-20 12:11:26 -0400 |
commit | 00c285d0d0fe4606d20fe88f1c824962475ba880 (patch) | |
tree | 2c5e40678df511746cea70ad79d77d5ead41dac6 /fs/splice.c | |
parent | 2bc010600d0a8add4470eb37e1ccca8aaa3d0070 (diff) |
fs: simplify do_splice_from
No need for a local function pointer when we can trivial branch on the
->splice_write presence.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/splice.c b/fs/splice.c index 77b10f45a3da..88942bf177d1 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -852,15 +852,9 @@ EXPORT_SYMBOL(generic_splice_sendpage); static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags) { - ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, - loff_t *, size_t, unsigned int); - if (out->f_op->splice_write) - splice_write = out->f_op->splice_write; - else - splice_write = default_file_splice_write; - - return splice_write(pipe, out, ppos, len, flags); + return out->f_op->splice_write(pipe, out, ppos, len, flags); + return default_file_splice_write(pipe, out, ppos, len, flags); } /* |