diff options
author | Christoph Hellwig <hch@lst.de> | 2015-02-11 13:56:46 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-12 23:50:23 -0400 |
commit | 66ee59af630fd8d5f4f56fb28162857e629aa0ab (patch) | |
tree | d1c4293f986fcb20824c90a2ab5f3f4e62543f8a /fs/read_write.c | |
parent | 96b62a57193494010eed66ca0739c93eb4653162 (diff) |
fs: remove ki_nbytes
There is no need to pass the total request length in the kiocb, as
we already get passed in through the iov_iter argument.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 8e1b68786d66..f8b8fc1316ab 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -343,7 +343,6 @@ ssize_t vfs_iter_read(struct file *file, struct iov_iter *iter, loff_t *ppos) | |||
343 | 343 | ||
344 | init_sync_kiocb(&kiocb, file); | 344 | init_sync_kiocb(&kiocb, file); |
345 | kiocb.ki_pos = *ppos; | 345 | kiocb.ki_pos = *ppos; |
346 | kiocb.ki_nbytes = iov_iter_count(iter); | ||
347 | 346 | ||
348 | iter->type |= READ; | 347 | iter->type |= READ; |
349 | ret = file->f_op->read_iter(&kiocb, iter); | 348 | ret = file->f_op->read_iter(&kiocb, iter); |
@@ -366,7 +365,6 @@ ssize_t vfs_iter_write(struct file *file, struct iov_iter *iter, loff_t *ppos) | |||
366 | 365 | ||
367 | init_sync_kiocb(&kiocb, file); | 366 | init_sync_kiocb(&kiocb, file); |
368 | kiocb.ki_pos = *ppos; | 367 | kiocb.ki_pos = *ppos; |
369 | kiocb.ki_nbytes = iov_iter_count(iter); | ||
370 | 368 | ||
371 | iter->type |= WRITE; | 369 | iter->type |= WRITE; |
372 | ret = file->f_op->write_iter(&kiocb, iter); | 370 | ret = file->f_op->write_iter(&kiocb, iter); |
@@ -426,7 +424,6 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp | |||
426 | 424 | ||
427 | init_sync_kiocb(&kiocb, filp); | 425 | init_sync_kiocb(&kiocb, filp); |
428 | kiocb.ki_pos = *ppos; | 426 | kiocb.ki_pos = *ppos; |
429 | kiocb.ki_nbytes = len; | ||
430 | 427 | ||
431 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); | 428 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); |
432 | if (-EIOCBQUEUED == ret) | 429 | if (-EIOCBQUEUED == ret) |
@@ -446,7 +443,6 @@ ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *p | |||
446 | 443 | ||
447 | init_sync_kiocb(&kiocb, filp); | 444 | init_sync_kiocb(&kiocb, filp); |
448 | kiocb.ki_pos = *ppos; | 445 | kiocb.ki_pos = *ppos; |
449 | kiocb.ki_nbytes = len; | ||
450 | iov_iter_init(&iter, READ, &iov, 1, len); | 446 | iov_iter_init(&iter, READ, &iov, 1, len); |
451 | 447 | ||
452 | ret = filp->f_op->read_iter(&kiocb, &iter); | 448 | ret = filp->f_op->read_iter(&kiocb, &iter); |
@@ -510,7 +506,6 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof | |||
510 | 506 | ||
511 | init_sync_kiocb(&kiocb, filp); | 507 | init_sync_kiocb(&kiocb, filp); |
512 | kiocb.ki_pos = *ppos; | 508 | kiocb.ki_pos = *ppos; |
513 | kiocb.ki_nbytes = len; | ||
514 | 509 | ||
515 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); | 510 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); |
516 | if (-EIOCBQUEUED == ret) | 511 | if (-EIOCBQUEUED == ret) |
@@ -530,7 +525,6 @@ ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, lo | |||
530 | 525 | ||
531 | init_sync_kiocb(&kiocb, filp); | 526 | init_sync_kiocb(&kiocb, filp); |
532 | kiocb.ki_pos = *ppos; | 527 | kiocb.ki_pos = *ppos; |
533 | kiocb.ki_nbytes = len; | ||
534 | iov_iter_init(&iter, WRITE, &iov, 1, len); | 528 | iov_iter_init(&iter, WRITE, &iov, 1, len); |
535 | 529 | ||
536 | ret = filp->f_op->write_iter(&kiocb, &iter); | 530 | ret = filp->f_op->write_iter(&kiocb, &iter); |
@@ -719,7 +713,6 @@ static ssize_t do_iter_readv_writev(struct file *filp, int rw, const struct iove | |||
719 | 713 | ||
720 | init_sync_kiocb(&kiocb, filp); | 714 | init_sync_kiocb(&kiocb, filp); |
721 | kiocb.ki_pos = *ppos; | 715 | kiocb.ki_pos = *ppos; |
722 | kiocb.ki_nbytes = len; | ||
723 | 716 | ||
724 | iov_iter_init(&iter, rw, iov, nr_segs, len); | 717 | iov_iter_init(&iter, rw, iov, nr_segs, len); |
725 | ret = fn(&kiocb, &iter); | 718 | ret = fn(&kiocb, &iter); |
@@ -737,7 +730,6 @@ static ssize_t do_sync_readv_writev(struct file *filp, const struct iovec *iov, | |||
737 | 730 | ||
738 | init_sync_kiocb(&kiocb, filp); | 731 | init_sync_kiocb(&kiocb, filp); |
739 | kiocb.ki_pos = *ppos; | 732 | kiocb.ki_pos = *ppos; |
740 | kiocb.ki_nbytes = len; | ||
741 | 733 | ||
742 | ret = fn(&kiocb, iov, nr_segs, kiocb.ki_pos); | 734 | ret = fn(&kiocb, iov, nr_segs, kiocb.ki_pos); |
743 | if (ret == -EIOCBQUEUED) | 735 | if (ret == -EIOCBQUEUED) |