]> Pileus Git - ~andy/linux/commitdiff
aoe: get rid of cached bv variable in bufinit()
authorJens Axboe <axboe@kernel.dk>
Mon, 25 Mar 2013 21:27:26 +0000 (15:27 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Mar 2013 21:27:26 +0000 (15:27 -0600)
Less error prone if we just kill it, it's only used once
anyway.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/aoe/aoecmd.c

index 25ef5c014fcaa4255e0e3009991b6a9ac1ff18c7..67d216c716dab59c5a8f9c8fc1c9933f82419ee4 100644 (file)
@@ -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);
 }