summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorChristoph Hellwig2019-04-25 09:03:00 +0200
committerJens Axboe2019-04-30 17:26:13 +0200
commit2b070cfe582b8e99fec6ada57d2e59e194aae202 (patch)
tree354961c24c2cc77cdaa66128c5f2a0997bc746e8 /drivers/md/bcache
parentbcache: clean up do_btree_node_write a bit (diff)
downloadkernel-qcow2-linux-2b070cfe582b8e99fec6ada57d2e59e194aae202.tar.gz
kernel-qcow2-linux-2b070cfe582b8e99fec6ada57d2e59e194aae202.tar.xz
kernel-qcow2-linux-2b070cfe582b8e99fec6ada57d2e59e194aae202.zip
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 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/btree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 3a9f8ed437de..773f5fdad25f 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -429,12 +429,11 @@ static void do_btree_node_write(struct btree *b)
bset_sector_offset(&b->keys, i));
if (!bch_bio_alloc_pages(b->bio, __GFP_NOWARN|GFP_NOWAIT)) {
- int j;
struct bio_vec *bv;
void *addr = (void *) ((unsigned long) i & ~(PAGE_SIZE - 1));
struct bvec_iter_all iter_all;
- bio_for_each_segment_all(bv, b->bio, j, iter_all) {
+ bio_for_each_segment_all(bv, b->bio, iter_all) {
memcpy(page_address(bv->bv_page), addr, PAGE_SIZE);
addr += PAGE_SIZE;
}