summaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-03 15:41:18 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:29:40 -0400
commit5d5d568975307877e9195f5305f4240e506a2807 (patch)
treeb58d5b1af9e77189357b95f5cb0dc635bba65285 /fs/read_write.c
parent86cc05840a0da1afcb6b8151b53f3b606457c91b (diff)
make new_sync_{read,write}() static
All places outside of core VFS that checked ->read and ->write for being NULL or called the methods directly are gone now, so NULL {read,write} with non-NULL {read,write}_iter will do the right thing in all cases. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index c75e6ef0952c..3ae8eee3b82a 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -28,7 +28,6 @@ typedef ssize_t (*iter_fn_t)(struct kiocb *, struct iov_iter *);
28 28
29const struct file_operations generic_ro_fops = { 29const struct file_operations generic_ro_fops = {
30 .llseek = generic_file_llseek, 30 .llseek = generic_file_llseek,
31 .read = new_sync_read,
32 .read_iter = generic_file_read_iter, 31 .read_iter = generic_file_read_iter,
33 .mmap = generic_file_readonly_mmap, 32 .mmap = generic_file_readonly_mmap,
34 .splice_read = generic_file_splice_read, 33 .splice_read = generic_file_splice_read,
@@ -428,7 +427,7 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp
428 427
429EXPORT_SYMBOL(do_sync_read); 428EXPORT_SYMBOL(do_sync_read);
430 429
431ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) 430static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
432{ 431{
433 struct iovec iov = { .iov_base = buf, .iov_len = len }; 432 struct iovec iov = { .iov_base = buf, .iov_len = len };
434 struct kiocb kiocb; 433 struct kiocb kiocb;
@@ -445,8 +444,6 @@ ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *p
445 return ret; 444 return ret;
446} 445}
447 446
448EXPORT_SYMBOL(new_sync_read);
449
450ssize_t __vfs_read(struct file *file, char __user *buf, size_t count, 447ssize_t __vfs_read(struct file *file, char __user *buf, size_t count,
451 loff_t *pos) 448 loff_t *pos)
452{ 449{
@@ -505,7 +502,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof
505 502
506EXPORT_SYMBOL(do_sync_write); 503EXPORT_SYMBOL(do_sync_write);
507 504
508ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) 505static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
509{ 506{
510 struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; 507 struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len };
511 struct kiocb kiocb; 508 struct kiocb kiocb;
@@ -522,8 +519,6 @@ ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, lo
522 return ret; 519 return ret;
523} 520}
524 521
525EXPORT_SYMBOL(new_sync_write);
526
527ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, 522ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
528 loff_t *pos) 523 loff_t *pos)
529{ 524{