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 /fs | |
parent | 6c09e94a32e1094983d39879b9e8ccf9ffdcfa36 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/read_write.c | 38 |
1 files changed, 0 insertions, 38 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 | |||
410 | return count > MAX_RW_COUNT ? MAX_RW_COUNT : count; | 410 | return count > MAX_RW_COUNT ? MAX_RW_COUNT : count; |
411 | } | 411 | } |
412 | 412 | ||
413 | ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) | ||
414 | { | ||
415 | struct iovec iov = { .iov_base = buf, .iov_len = len }; | ||
416 | struct kiocb kiocb; | ||
417 | ssize_t ret; | ||
418 | |||
419 | init_sync_kiocb(&kiocb, filp); | ||
420 | kiocb.ki_pos = *ppos; | ||
421 | |||
422 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); | ||
423 | BUG_ON(ret == -EIOCBQUEUED); | ||
424 | *ppos = kiocb.ki_pos; | ||
425 | return ret; | ||
426 | } | ||
427 | |||
428 | EXPORT_SYMBOL(do_sync_read); | ||
429 | |||
430 | static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) | 413 | static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) |
431 | { | 414 | { |
432 | struct iovec iov = { .iov_base = buf, .iov_len = len }; | 415 | 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, | |||
449 | { | 432 | { |
450 | if (file->f_op->read) | 433 | if (file->f_op->read) |
451 | return file->f_op->read(file, buf, count, pos); | 434 | return file->f_op->read(file, buf, count, pos); |
452 | else if (file->f_op->aio_read) | ||
453 | return do_sync_read(file, buf, count, pos); | ||
454 | else if (file->f_op->read_iter) | 435 | else if (file->f_op->read_iter) |
455 | return new_sync_read(file, buf, count, pos); | 436 | return new_sync_read(file, buf, count, pos); |
456 | else | 437 | else |
@@ -485,23 +466,6 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) | |||
485 | 466 | ||
486 | EXPORT_SYMBOL(vfs_read); | 467 | EXPORT_SYMBOL(vfs_read); |
487 | 468 | ||
488 | ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) | ||
489 | { | ||
490 | struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; | ||
491 | struct kiocb kiocb; | ||
492 | ssize_t ret; | ||
493 | |||
494 | init_sync_kiocb(&kiocb, filp); | ||
495 | kiocb.ki_pos = *ppos; | ||
496 | |||
497 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); | ||
498 | BUG_ON(ret == -EIOCBQUEUED); | ||
499 | *ppos = kiocb.ki_pos; | ||
500 | return ret; | ||
501 | } | ||
502 | |||
503 | EXPORT_SYMBOL(do_sync_write); | ||
504 | |||
505 | static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) | 469 | static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) |
506 | { | 470 | { |
507 | struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len }; | 471 | 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, | |||
524 | { | 488 | { |
525 | if (file->f_op->write) | 489 | if (file->f_op->write) |
526 | return file->f_op->write(file, p, count, pos); | 490 | return file->f_op->write(file, p, count, pos); |
527 | else if (file->f_op->aio_write) | ||
528 | return do_sync_write(file, p, count, pos); | ||
529 | else if (file->f_op->write_iter) | 491 | else if (file->f_op->write_iter) |
530 | return new_sync_write(file, p, count, pos); | 492 | return new_sync_write(file, p, count, pos); |
531 | else | 493 | else |