Commit fcde9075 authored by Namhyung Kim's avatar Namhyung Kim Committed by NeilBrown

md/raid5: remove unusual use of bio_iovec_idx()

In the bio_for_each_segment loop, bvl always points current
bio_vec, so the same as bio_iovec_idx(, i). Let's get rid of
it.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent b062962e
...@@ -585,7 +585,7 @@ async_copy_data(int frombio, struct bio *bio, struct page *page, ...@@ -585,7 +585,7 @@ async_copy_data(int frombio, struct bio *bio, struct page *page,
init_async_submit(&submit, flags, tx, NULL, NULL, NULL); init_async_submit(&submit, flags, tx, NULL, NULL, NULL);
bio_for_each_segment(bvl, bio, i) { bio_for_each_segment(bvl, bio, i) {
int len = bio_iovec_idx(bio, i)->bv_len; int len = bvl->bv_len;
int clen; int clen;
int b_offset = 0; int b_offset = 0;
...@@ -601,8 +601,8 @@ async_copy_data(int frombio, struct bio *bio, struct page *page, ...@@ -601,8 +601,8 @@ async_copy_data(int frombio, struct bio *bio, struct page *page,
clen = len; clen = len;
if (clen > 0) { if (clen > 0) {
b_offset += bio_iovec_idx(bio, i)->bv_offset; b_offset += bvl->bv_offset;
bio_page = bio_iovec_idx(bio, i)->bv_page; bio_page = bvl->bv_page;
if (frombio) if (frombio)
tx = async_memcpy(page, bio_page, page_offset, tx = async_memcpy(page, bio_page, page_offset,
b_offset, clen, &submit); b_offset, clen, &submit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment