diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-03-25 15:27:26 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-25 15:27:26 -0600 |
commit | 2124469efa6079e6c325165fb1926159356b15c3 (patch) | |
tree | 1168735fae8c9efa9b320edd3bfb08618cef734e /drivers/block/aoe | |
parent | b1a67b0f4c747ca10c96ebb24f04e2a74b3c298d (diff) | |
download | linux-2124469efa6079e6c325165fb1926159356b15c3.tar.gz linux-2124469efa6079e6c325165fb1926159356b15c3.tar.bz2 linux-2124469efa6079e6c325165fb1926159356b15c3.zip |
aoe: get rid of cached bv variable in bufinit()
Less error prone if we just kill it, it's only used once
anyway.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 25ef5c014fca..67d216c716da 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -919,16 +919,14 @@ bio_pagedec(struct bio *bio) static void bufinit(struct buf *buf, struct request *rq, struct bio *bio) { - struct bio_vec *bv; - memset(buf, 0, sizeof(*buf)); buf->rq = rq; buf->bio = bio; buf->resid = bio->bi_size; buf->sector = bio->bi_sector; bio_pageinc(bio); - buf->bv = bv = &bio->bi_io_vec[bio->bi_idx]; - buf->bv_resid = bv->bv_len; + buf->bv = &bio->bi_io_vec[bio->bi_idx]; + buf->bv_resid = buf->bv->bv_len; WARN_ON(buf->bv_resid == 0); } |