mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
block: remove get_io_context_active
Fold it into it's only caller, and remove a lof of the debug checks that are not needed. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211126115817.2087431-10-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
222ee581b8
commit
50569c24be
@@ -113,22 +113,6 @@ struct io_context {
|
||||
struct work_struct release_work;
|
||||
};
|
||||
|
||||
/**
|
||||
* get_io_context_active - get active reference on ioc
|
||||
* @ioc: ioc of interest
|
||||
*
|
||||
* Only iocs with active reference can issue new IOs. This function
|
||||
* acquires an active reference on @ioc. The caller must already have an
|
||||
* active reference on @ioc.
|
||||
*/
|
||||
static inline void get_io_context_active(struct io_context *ioc)
|
||||
{
|
||||
WARN_ON_ONCE(atomic_long_read(&ioc->refcount) <= 0);
|
||||
WARN_ON_ONCE(atomic_read(&ioc->active_ref) <= 0);
|
||||
atomic_long_inc(&ioc->refcount);
|
||||
atomic_inc(&ioc->active_ref);
|
||||
}
|
||||
|
||||
struct task_struct;
|
||||
#ifdef CONFIG_BLOCK
|
||||
void put_io_context(struct io_context *ioc);
|
||||
|
||||
Reference in New Issue
Block a user