Skip to content

Commit 69df79a

Browse files
dhowellsaxboe
authored andcommitted
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: Christoph Hellwig <[email protected]> Signed-off-by: David Howells <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Christian Brauner <[email protected]> cc: Steve French <[email protected]> cc: Jens Axboe <[email protected]> cc: Al Viro <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 83aeff8 commit 69df79a

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

fs/cifs/cifsfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ const struct file_operations cifs_file_direct_ops = {
14161416
.fsync = cifs_fsync,
14171417
.flush = cifs_flush,
14181418
.mmap = cifs_file_mmap,
1419-
.splice_read = direct_splice_read,
1419+
.splice_read = copy_splice_read,
14201420
.splice_write = iter_file_splice_write,
14211421
.unlocked_ioctl = cifs_ioctl,
14221422
.copy_file_range = cifs_copy_file_range,
@@ -1470,7 +1470,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = {
14701470
.fsync = cifs_fsync,
14711471
.flush = cifs_flush,
14721472
.mmap = cifs_file_mmap,
1473-
.splice_read = direct_splice_read,
1473+
.splice_read = copy_splice_read,
14741474
.splice_write = iter_file_splice_write,
14751475
.unlocked_ioctl = cifs_ioctl,
14761476
.copy_file_range = cifs_copy_file_range,

fs/cifs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5091,6 +5091,6 @@ ssize_t cifs_splice_read(struct file *in, loff_t *ppos,
50915091
if (unlikely(!len))
50925092
return 0;
50935093
if (in->f_flags & O_DIRECT)
5094-
return direct_splice_read(in, ppos, pipe, len, flags);
5094+
return copy_splice_read(in, ppos, pipe, len, flags);
50955095
return filemap_splice_read(in, ppos, pipe, len, flags);
50965096
}

fs/splice.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,11 @@ void splice_shrink_spd(struct splice_pipe_desc *spd)
300300
}
301301

302302
/*
303-
* Splice data from an O_DIRECT file into pages and then add them to the output
304-
* pipe.
303+
* Copy data from a file into pages and then splice those into the output pipe.
305304
*/
306-
ssize_t direct_splice_read(struct file *in, loff_t *ppos,
307-
struct pipe_inode_info *pipe,
308-
size_t len, unsigned int flags)
305+
ssize_t copy_splice_read(struct file *in, loff_t *ppos,
306+
struct pipe_inode_info *pipe,
307+
size_t len, unsigned int flags)
309308
{
310309
struct iov_iter to;
311310
struct bio_vec *bv;
@@ -390,7 +389,7 @@ ssize_t direct_splice_read(struct file *in, loff_t *ppos,
390389
kfree(bv);
391390
return ret;
392391
}
393-
EXPORT_SYMBOL(direct_splice_read);
392+
EXPORT_SYMBOL(copy_splice_read);
394393

395394
/**
396395
* generic_file_splice_read - splice data from file to a pipe

include/linux/fs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,9 +2752,9 @@ ssize_t vfs_iocb_iter_write(struct file *file, struct kiocb *iocb,
27522752
ssize_t filemap_splice_read(struct file *in, loff_t *ppos,
27532753
struct pipe_inode_info *pipe,
27542754
size_t len, unsigned int flags);
2755-
ssize_t direct_splice_read(struct file *in, loff_t *ppos,
2756-
struct pipe_inode_info *pipe,
2757-
size_t len, unsigned int flags);
2755+
ssize_t copy_splice_read(struct file *in, loff_t *ppos,
2756+
struct pipe_inode_info *pipe,
2757+
size_t len, unsigned int flags);
27582758
extern ssize_t generic_file_splice_read(struct file *, loff_t *,
27592759
struct pipe_inode_info *, size_t, unsigned int);
27602760
extern ssize_t iter_file_splice_write(struct pipe_inode_info *,

0 commit comments

Comments
 (0)