summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-12-09 07:31:21 +0100
committerJens Axboe <axboe@kernel.dk>2021-12-16 10:59:01 -0700
commit8a2ba1785c5803d59a63b6320ff54fd4a37a41ce (patch)
treeb7ffd1b051050a0ca683c4f965589cbc8e43e509 /block
parentd62cbcf62f2f4bf933d18113bcda45e18cc890f6 (diff)
downloadlinux-8a2ba1785c5803d59a63b6320ff54fd4a37a41ce.tar.bz2
block: remove the nr_task field from struct io_context
Nothing ever looks at ->nr_tasks, so remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20211209063131.18537-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-ioc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 536fb496ad76..96336c2134ef 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -207,7 +207,6 @@ void exit_io_context(struct task_struct *task)
task->io_context = NULL;
task_unlock(task);
- atomic_dec(&ioc->nr_tasks);
put_io_context_active(ioc);
}
@@ -259,7 +258,6 @@ static struct io_context *alloc_io_context(gfp_t gfp_flags, int node)
return NULL;
atomic_long_set(&ioc->refcount, 1);
- atomic_set(&ioc->nr_tasks, 1);
atomic_set(&ioc->active_ref, 1);
spin_lock_init(&ioc->lock);
INIT_RADIX_TREE(&ioc->icq_tree, GFP_ATOMIC);
@@ -339,7 +337,6 @@ int __copy_io(unsigned long clone_flags, struct task_struct *tsk)
if (clone_flags & CLONE_IO) {
atomic_long_inc(&ioc->refcount);
atomic_inc(&ioc->active_ref);
- atomic_inc(&ioc->nr_tasks);
tsk->io_context = ioc;
} else if (ioprio_valid(ioc->ioprio)) {
tsk->io_context = alloc_io_context(GFP_KERNEL, NUMA_NO_NODE);