summary refs log tree commit diff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-11-13 11:18:32 -0700
committerJens Axboe <axboe@kernel.dk>2021-11-29 06:38:44 -0700
commit5a9d041ba2f6da468c891ca0fe263758e2c12091 (patch)
treeb3d5bcc519faf89478dfd375f9f1590f1e759216 /block/blk-core.c
parent48b5c1fbcd8c5bc6b91a56399a5257b801391dd8 (diff)
downloadlinux-5a9d041ba2f6da468c891ca0fe263758e2c12091.tar.gz
block: move io_context creation into where it's needed
The only user of the io_context for IO is BFQ, yet we put the checking
and logic of it into the normal IO path.

Put the creation into blk_mq_sched_assign_ioc(), and have BFQ use that
helper.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 35a04d8c180a..2053d1b0e90e 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -750,15 +750,6 @@ noinline_for_stack bool submit_bio_checks(struct bio *bio)
 		break;
 	}
 
-	/*
-	 * Various block parts want %current->io_context, so allocate it up
-	 * front rather than dealing with lots of pain to allocate it only
-	 * where needed. This may fail and the block layer knows how to live
-	 * with it.
-	 */
-	if (unlikely(!current->io_context))
-		create_task_io_context(current, GFP_ATOMIC, q->node);
-
 	if (blk_throtl_bio(bio))
 		return false;