mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
block: Fix io_context leak after clone with CLONE_IO
With CLONE_IO, copy_io() increments both ioc->refcount and ioc->nr_tasks. However exit_io_context() only decrements ioc->refcount if ioc->nr_tasks reaches 0. Always call put_io_context() in exit_io_context(). Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
3c764b7a65
commit
61cc74fbb8
1 changed files with 1 additions and 1 deletions
|
@ -80,8 +80,8 @@ void exit_io_context(void)
|
|||
ioc->aic->exit(ioc->aic);
|
||||
cfq_exit(ioc);
|
||||
|
||||
put_io_context(ioc);
|
||||
}
|
||||
put_io_context(ioc);
|
||||
}
|
||||
|
||||
struct io_context *alloc_io_context(gfp_t gfp_flags, int node)
|
||||
|
|
Loading…
Reference in a new issue