io-wq: fix error path leak of buffered write hash map
The 'err' path should include the hash put, we already grabbed a reference
once we get that far.
Fixes: e941894eae
("io-wq: make buffered file write hashed work map per-ctx")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
16270893d7
commit
dc7bbc9ef3
@ -1047,8 +1047,8 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
|
|||||||
if (!ret)
|
if (!ret)
|
||||||
return wq;
|
return wq;
|
||||||
|
|
||||||
io_wq_put_hash(data->hash);
|
|
||||||
err:
|
err:
|
||||||
|
io_wq_put_hash(data->hash);
|
||||||
cpuhp_state_remove_instance_nocalls(io_wq_online, &wq->cpuhp_node);
|
cpuhp_state_remove_instance_nocalls(io_wq_online, &wq->cpuhp_node);
|
||||||
for_each_node(node)
|
for_each_node(node)
|
||||||
kfree(wq->wqes[node]);
|
kfree(wq->wqes[node]);
|
||||||
|
Loading…
Reference in New Issue
Block a user