summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2018-11-20 10:52:34 +0900
committerJens Axboe <axboe@kernel.dk>2018-11-19 19:03:44 -0700
commite2b3fa5af70c1e646270f6c7c799414f5e904d7a (patch)
treec4a2a5236528e6b4efe8537328e1d9647b84795d /block/blk-core.c
parent23464f8c3407b83106463999b64fe10dc66ff6a3 (diff)
downloadblackbird-op-linux-e2b3fa5af70c1e646270f6c7c799414f5e904d7a.tar.gz
blackbird-op-linux-e2b3fa5af70c1e646270f6c7c799414f5e904d7a.zip
block: Remove bio->bi_ioc
bio->bi_ioc is never set so always NULL. Remove references to it in bio_disassociate_task() and in rq_ioc() and delete this field from struct bio. With this change, rq_ioc() always returns current->io_context without the need for a bio argument. Further simplify the code and make it more readable by also removing this helper, which also allows to simplify blk_mq_sched_assign_ioc() by removing its bio argument. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Adam Manzanares <adam.manzanares@wdc.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index d6e8ab9ca99d..492648c96992 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -813,7 +813,7 @@ out:
void blk_init_request_from_bio(struct request *req, struct bio *bio)
{
- struct io_context *ioc = rq_ioc(bio);
+ struct io_context *ioc = current->io_context;
if (bio->bi_opf & REQ_RAHEAD)
req->cmd_flags |= REQ_FAILFAST_MASK;
OpenPOWER on IntegriCloud