summaryrefslogtreecommitdiff
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-04-25 10:03:00 +0300
committerJens Axboe <axboe@kernel.dk>2019-04-30 18:26:13 +0300
commit2b070cfe582b8e99fec6ada57d2e59e194aae202 (patch)
tree354961c24c2cc77cdaa66128c5f2a0997bc746e8 /fs/block_dev.c
parentf936b06ae53815a7633b30ffd8cf5661ac826b3a (diff)
downloadlinux-2b070cfe582b8e99fec6ada57d2e59e194aae202.tar.xz
block: remove the i argument to bio_for_each_segment_all
We only have two callers that need the integer loop iterator, and they can easily maintain it themselves. Suggested-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: David Sterba <dsterba@suse.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Coly Li <colyli@suse.de> Reviewed-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 24615c76c1d0..8abc6570d29f 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -210,7 +210,6 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter,
struct bio bio;
ssize_t ret;
blk_qc_t qc;
- int i;
struct bvec_iter_all iter_all;
if ((pos | iov_iter_alignment(iter)) &
@@ -261,7 +260,7 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter,
}
__set_current_state(TASK_RUNNING);
- bio_for_each_segment_all(bvec, &bio, i, iter_all) {
+ bio_for_each_segment_all(bvec, &bio, iter_all) {
if (should_dirty && !PageCompound(bvec->bv_page))
set_page_dirty_lock(bvec->bv_page);
put_page(bvec->bv_page);
@@ -339,9 +338,8 @@ static void blkdev_bio_end_io(struct bio *bio)
if (!bio_flagged(bio, BIO_NO_PAGE_REF)) {
struct bvec_iter_all iter_all;
struct bio_vec *bvec;
- int i;
- bio_for_each_segment_all(bvec, bio, i, iter_all)
+ bio_for_each_segment_all(bvec, bio, iter_all)
put_page(bvec->bv_page);
}
bio_put(bio);