diff options
author | Christoph Hellwig <hch@lst.de> | 2020-04-25 09:55:51 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-25 09:44:40 -0600 |
commit | 3e82c3485e835b4dc7374316357fa388676201d7 (patch) | |
tree | 2dd8ef2e7e7671ae89034a04c34d9e7ab263729f /block/blk.h | |
parent | 28d65729b050977d8a9125e6726871e83bd22124 (diff) | |
download | lwn-3e82c3485e835b4dc7374316357fa388676201d7.tar.gz lwn-3e82c3485e835b4dc7374316357fa388676201d7.zip |
block: remove create_io_context
create_io_context just has a single caller, which also happens to not
even use the return value. Just open code it there.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/block/blk.h b/block/blk.h index 204963bb03e8..73bd3b1c6938 100644 --- a/block/blk.h +++ b/block/blk.h @@ -303,26 +303,6 @@ void ioc_clear_queue(struct request_queue *q); int create_task_io_context(struct task_struct *task, gfp_t gfp_mask, int node); -/** - * create_io_context - try to create task->io_context - * @gfp_mask: allocation mask - * @node: allocation node - * - * If %current->io_context is %NULL, allocate a new io_context and install - * it. Returns the current %current->io_context which may be %NULL if - * allocation failed. - * - * Note that this function can't be called with IRQ disabled because - * task_lock which protects %current->io_context is IRQ-unsafe. - */ -static inline struct io_context *create_io_context(gfp_t gfp_mask, int node) -{ - WARN_ON_ONCE(irqs_disabled()); - if (unlikely(!current->io_context)) - create_task_io_context(current, gfp_mask, node); - return current->io_context; -} - /* * Internal throttling interface */ |