aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/aoe/aoecmd.c6
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)
919static void 919static void
920bufinit(struct buf *buf, struct request *rq, struct bio *bio) 920bufinit(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