Skip to content

Commit

Permalink
io-wq: fix error path leak of buffered write hash map
Browse files Browse the repository at this point in the history
The 'err' path should include the hash put, we already grabbed a reference
once we get that far.

Fixes: e941894 ("io-wq: make buffered file write hashed work map per-ctx")
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Mar 4, 2021
1 parent 1627089 commit dc7bbc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/io-wq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,8 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
if (!ret)
return wq;

io_wq_put_hash(data->hash);
err:
io_wq_put_hash(data->hash);
cpuhp_state_remove_instance_nocalls(io_wq_online, &wq->cpuhp_node);
for_each_node(node)
kfree(wq->wqes[node]);
Expand Down

0 comments on commit dc7bbc9

Please sign in to comment.