diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-03 22:10:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:29:42 -0400 |
commit | 9a219bc70b54523c8f14a3c957179854785ee97c (patch) | |
tree | 6ac486e87780c2aaeb3b77290ee54e189ebc0973 | |
parent | 6c09e94a32e1094983d39879b9e8ccf9ffdcfa36 (diff) | |
download | linux-stable-9a219bc70b54523c8f14a3c957179854785ee97c.tar.gz linux-stable-9a219bc70b54523c8f14a3c957179854785ee97c.tar.bz2 linux-stable-9a219bc70b54523c8f14a3c957179854785ee97c.zip |
kill do_sync_read/do_sync_write
all remaining instances of aio_{read,write} (all 4 of them) have explicit
->read and ->write resp.; do_sync_read/do_sync_write is never called by
__vfs_read/__vfs_write anymore and no other users had been left.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/read_write.c | 38 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
2 files changed, 0 insertions, 40 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 3ae8eee3b82a..3d42d8ee5940 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -410,23 +410,6 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t return count > MAX_RW_COUNT ? MAX_RW_COUNT : count; } -ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) -{ - struct iovec iov = { .iov_base = buf, .iov_len = len }; - struct kiocb kiocb; - ssize_t ret; - - init_sync_kiocb(&kiocb, filp); - kiocb.ki_pos = *ppos; - - ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); - BUG_ON(ret == -EIOCBQUEUED); - *ppos = kiocb.ki_pos; - return ret; -} - -EXPORT_SYMBOL(do_sync_read); - static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) { struct iovec iov = { .iov_base = buf, .iov_len = len }; @@ -449,8 +432,6 @@ ssize_t __vfs_read(struct file *file, char __user *buf, size_t count, { if (file->f_op->read) return file->f_op->read(file, buf, count, pos); - else if (file->f_op->aio_read) - return do_sync_read(file, buf, count, pos); else if (file->f_op->read_iter) return new_sync_read(file, buf, count, pos); else @@ -485,23 +466,6 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) EXPORT_SYMBOL(vfs_read); -ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) -{ - struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; - struct kiocb kiocb; - ssize_t ret; - - init_sync_kiocb(&kiocb, filp); - kiocb.ki_pos = *ppos; - - ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); - BUG_ON(ret == -EIOCBQUEUED); - *ppos = kiocb.ki_pos; - return ret; -} - -EXPORT_SYMBOL(do_sync_write); - static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) { struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; @@ -524,8 +488,6 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, { if (file->f_op->write) return file->f_op->write(file, p, count, pos); - else if (file->f_op->aio_write) - return do_sync_write(file, p, count, pos); else if (file->f_op->write_iter) return new_sync_write(file, p, count, pos); else diff --git a/include/linux/fs.h b/include/linux/fs.h index cade1304d27b..83e122c1a902 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2574,8 +2574,6 @@ extern ssize_t __generic_file_write_iter(struct kiocb *, struct iov_iter *); extern ssize_t generic_file_write_iter(struct kiocb *, struct iov_iter *); extern ssize_t generic_file_direct_write(struct kiocb *, struct iov_iter *, loff_t); extern ssize_t generic_perform_write(struct file *, struct iov_iter *, loff_t); -extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); -extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); ssize_t vfs_iter_read(struct file *file, struct iov_iter *iter, loff_t *ppos); ssize_t vfs_iter_write(struct file *file, struct iov_iter *iter, loff_t *ppos); |