diff options
author | Christoph Hellwig <hch@lst.de> | 2018-11-10 11:30:47 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-10 18:03:49 +0300 |
commit | 61e7712e25bbe964c9537bb1171bac4df7afa593 (patch) | |
tree | 791c25fa0971d6acdb68e5b6737f1b8b6e947583 /drivers/block/aoe/aoedev.c | |
parent | 1bee42438f32de405987b4a41b93624b184ae481 (diff) | |
download | linux-61e7712e25bbe964c9537bb1171bac4df7afa593.tar.xz |
aoe: replace ->special use with private data in the request
Makes the code a whole lot easier to read.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/aoe/aoedev.c')
-rw-r--r-- | drivers/block/aoe/aoedev.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index 9063f8efbd3b..5b49f1b33ebe 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -160,21 +160,22 @@ static void aoe_failip(struct aoedev *d) { struct request *rq; + struct aoe_req *req; struct bio *bio; - unsigned long n; aoe_failbuf(d, d->ip.buf); - rq = d->ip.rq; if (rq == NULL) return; + + req = blk_mq_rq_to_pdu(rq); while ((bio = d->ip.nxbio)) { bio->bi_status = BLK_STS_IOERR; d->ip.nxbio = bio->bi_next; - n = (unsigned long) rq->special; - rq->special = (void *) --n; + req->nr_bios--; } - if ((unsigned long) rq->special == 0) + + if (!req->nr_bios) aoe_end_request(d, rq, 0); } |