Commit 69df79a4 authored by David Howells's avatar David Howells Committed by Jens Axboe

splice: Rename direct_splice_read() to copy_splice_read()

Rename direct_splice_read() to copy_splice_read() to better reflect as to
what it does.
Suggested-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
cc: Steve French <sfrench@samba.org>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: linux-cifs@vger.kernel.org
cc: linux-mm@kvack.org
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20230522135018.2742245-4-dhowells@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 83aeff88
...@@ -1416,7 +1416,7 @@ const struct file_operations cifs_file_direct_ops = { ...@@ -1416,7 +1416,7 @@ const struct file_operations cifs_file_direct_ops = {
.fsync = cifs_fsync, .fsync = cifs_fsync,
.flush = cifs_flush, .flush = cifs_flush,
.mmap = cifs_file_mmap, .mmap = cifs_file_mmap,
.splice_read = direct_splice_read, .splice_read = copy_splice_read,
.splice_write = iter_file_splice_write, .splice_write = iter_file_splice_write,
.unlocked_ioctl = cifs_ioctl, .unlocked_ioctl = cifs_ioctl,
.copy_file_range = cifs_copy_file_range, .copy_file_range = cifs_copy_file_range,
...@@ -1470,7 +1470,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = { ...@@ -1470,7 +1470,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = {
.fsync = cifs_fsync, .fsync = cifs_fsync,
.flush = cifs_flush, .flush = cifs_flush,
.mmap = cifs_file_mmap, .mmap = cifs_file_mmap,
.splice_read = direct_splice_read, .splice_read = copy_splice_read,
.splice_write = iter_file_splice_write, .splice_write = iter_file_splice_write,
.unlocked_ioctl = cifs_ioctl, .unlocked_ioctl = cifs_ioctl,
.copy_file_range = cifs_copy_file_range, .copy_file_range = cifs_copy_file_range,
......
...@@ -5091,6 +5091,6 @@ ssize_t cifs_splice_read(struct file *in, loff_t *ppos, ...@@ -5091,6 +5091,6 @@ ssize_t cifs_splice_read(struct file *in, loff_t *ppos,
if (unlikely(!len)) if (unlikely(!len))
return 0; return 0;
if (in->f_flags & O_DIRECT) if (in->f_flags & O_DIRECT)
return direct_splice_read(in, ppos, pipe, len, flags); return copy_splice_read(in, ppos, pipe, len, flags);
return filemap_splice_read(in, ppos, pipe, len, flags); return filemap_splice_read(in, ppos, pipe, len, flags);
} }
...@@ -300,10 +300,9 @@ void splice_shrink_spd(struct splice_pipe_desc *spd) ...@@ -300,10 +300,9 @@ void splice_shrink_spd(struct splice_pipe_desc *spd)
} }
/* /*
* Splice data from an O_DIRECT file into pages and then add them to the output * Copy data from a file into pages and then splice those into the output pipe.
* pipe.
*/ */
ssize_t direct_splice_read(struct file *in, loff_t *ppos, ssize_t copy_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, struct pipe_inode_info *pipe,
size_t len, unsigned int flags) size_t len, unsigned int flags)
{ {
...@@ -390,7 +389,7 @@ ssize_t direct_splice_read(struct file *in, loff_t *ppos, ...@@ -390,7 +389,7 @@ ssize_t direct_splice_read(struct file *in, loff_t *ppos,
kfree(bv); kfree(bv);
return ret; return ret;
} }
EXPORT_SYMBOL(direct_splice_read); EXPORT_SYMBOL(copy_splice_read);
/** /**
* generic_file_splice_read - splice data from file to a pipe * generic_file_splice_read - splice data from file to a pipe
......
...@@ -2752,7 +2752,7 @@ ssize_t vfs_iocb_iter_write(struct file *file, struct kiocb *iocb, ...@@ -2752,7 +2752,7 @@ ssize_t vfs_iocb_iter_write(struct file *file, struct kiocb *iocb,
ssize_t filemap_splice_read(struct file *in, loff_t *ppos, ssize_t filemap_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, struct pipe_inode_info *pipe,
size_t len, unsigned int flags); size_t len, unsigned int flags);
ssize_t direct_splice_read(struct file *in, loff_t *ppos, ssize_t copy_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, struct pipe_inode_info *pipe,
size_t len, unsigned int flags); size_t len, unsigned int flags);
extern ssize_t generic_file_splice_read(struct file *, loff_t *, extern ssize_t generic_file_splice_read(struct file *, loff_t *,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment