aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-09-22 23:35:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-10-05 18:23:56 -0400
commit82c156f853840645604acd7c2cebcb75ed1b6652 (patch)
tree19d74fbaafb300aa05523ad0ecb60f24f82c5d1f /fs/nfs/file.c
parent241699cd72a8489c9446ae3910ddd243e9b9061b (diff)
switch generic_file_splice_read() to use of ->read_iter()
... and kill the ->splice_read() instances that can be switched to it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index ca699ddc11c1..2efbdde36c3e 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -182,29 +182,6 @@ nfs_file_read(struct kiocb *iocb, struct iov_iter *to)
182} 182}
183EXPORT_SYMBOL_GPL(nfs_file_read); 183EXPORT_SYMBOL_GPL(nfs_file_read);
184 184
185ssize_t
186nfs_file_splice_read(struct file *filp, loff_t *ppos,
187 struct pipe_inode_info *pipe, size_t count,
188 unsigned int flags)
189{
190 struct inode *inode = file_inode(filp);
191 ssize_t res;
192
193 dprintk("NFS: splice_read(%pD2, %lu@%Lu)\n",
194 filp, (unsigned long) count, (unsigned long long) *ppos);
195
196 nfs_start_io_read(inode);
197 res = nfs_revalidate_mapping(inode, filp->f_mapping);
198 if (!res) {
199 res = generic_file_splice_read(filp, ppos, pipe, count, flags);
200 if (res > 0)
201 nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, res);
202 }
203 nfs_end_io_read(inode);
204 return res;
205}
206EXPORT_SYMBOL_GPL(nfs_file_splice_read);
207
208int 185int
209nfs_file_mmap(struct file * file, struct vm_area_struct * vma) 186nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
210{ 187{
@@ -871,7 +848,7 @@ const struct file_operations nfs_file_operations = {
871 .fsync = nfs_file_fsync, 848 .fsync = nfs_file_fsync,
872 .lock = nfs_lock, 849 .lock = nfs_lock,
873 .flock = nfs_flock, 850 .flock = nfs_flock,
874 .splice_read = nfs_file_splice_read, 851 .splice_read = generic_file_splice_read,
875 .splice_write = iter_file_splice_write, 852 .splice_write = iter_file_splice_write,
876 .check_flags = nfs_check_flags, 853 .check_flags = nfs_check_flags,
877 .setlease = simple_nosetlease, 854 .setlease = simple_nosetlease,