Skip to content

Commit dc7bbc9

Browse files
committed
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: e941894 ("io-wq: make buffered file write hashed work map per-ctx") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 1627089 commit dc7bbc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/io-wq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,8 @@ struct io_wq *io_wq_create(unsigned bounded, struct io_wq_data *data)
10471047
if (!ret)
10481048
return wq;
10491049

1050-
io_wq_put_hash(data->hash);
10511050
err:
1051+
io_wq_put_hash(data->hash);
10521052
cpuhp_state_remove_instance_nocalls(io_wq_online, &wq->cpuhp_node);
10531053
for_each_node(node)
10541054
kfree(wq->wqes[node]);

0 commit comments

Comments
 (0)