Skip to content

Commit

Permalink
md/raid5: remove unusual use of bio_iovec_idx()
Browse files Browse the repository at this point in the history
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: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
Namhyung Kim authored and NeilBrown committed Jun 14, 2011
1 parent b062962 commit fcde907
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ async_copy_data(int frombio, struct bio *bio, struct page *page,
init_async_submit(&submit, flags, tx, NULL, NULL, NULL);

bio_for_each_segment(bvl, bio, i) {
int len = bio_iovec_idx(bio, i)->bv_len;
int len = bvl->bv_len;
int clen;
int b_offset = 0;

Expand All @@ -601,8 +601,8 @@ async_copy_data(int frombio, struct bio *bio, struct page *page,
clen = len;

if (clen > 0) {
b_offset += bio_iovec_idx(bio, i)->bv_offset;
bio_page = bio_iovec_idx(bio, i)->bv_page;
b_offset += bvl->bv_offset;
bio_page = bvl->bv_page;
if (frombio)
tx = async_memcpy(page, bio_page, page_offset,
b_offset, clen, &submit);
Expand Down

0 comments on commit fcde907

Please sign in to comment.