diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-03-25 17:27:26 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-25 17:27:26 -0400 |
commit | 2124469efa6079e6c325165fb1926159356b15c3 (patch) | |
tree | 1168735fae8c9efa9b320edd3bfb08618cef734e | |
parent | b1a67b0f4c747ca10c96ebb24f04e2a74b3c298d (diff) |
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>
-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) | |||
919 | static void | 919 | static void |
920 | bufinit(struct buf *buf, struct request *rq, struct bio *bio) | 920 | bufinit(struct buf *buf, struct request *rq, struct bio *bio) |
921 | { | 921 | { |
922 | struct bio_vec *bv; | ||
923 | |||
924 | memset(buf, 0, sizeof(*buf)); | 922 | memset(buf, 0, sizeof(*buf)); |
925 | buf->rq = rq; | 923 | buf->rq = rq; |
926 | buf->bio = bio; | 924 | buf->bio = bio; |
927 | buf->resid = bio->bi_size; | 925 | buf->resid = bio->bi_size; |
928 | buf->sector = bio->bi_sector; | 926 | buf->sector = bio->bi_sector; |
929 | bio_pageinc(bio); | 927 | bio_pageinc(bio); |
930 | buf->bv = bv = &bio->bi_io_vec[bio->bi_idx]; | 928 | buf->bv = &bio->bi_io_vec[bio->bi_idx]; |
931 | buf->bv_resid = bv->bv_len; | 929 | buf->bv_resid = buf->bv->bv_len; |
932 | WARN_ON(buf->bv_resid == 0); | 930 | WARN_ON(buf->bv_resid == 0); |
933 | } | 931 | } |
934 | 932 | ||