diff options
author | Michal Koutný <mkoutny@suse.com> | 2022-07-15 20:45:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-17 16:14:20 +0300 |
commit | 901e61b5e0f65d5ed1aee1fd3867122cc0d52c15 (patch) | |
tree | af8bfbea5441b3c5fd717a73a7b500a2b7a0b241 /io_uring | |
parent | 674147513db30edcb04a1c631a4b47a9b2deaa3c (diff) | |
download | linux-901e61b5e0f65d5ed1aee1fd3867122cc0d52c15.tar.xz |
io_uring: Don't require reinitable percpu_ref
[ Upstream commit 48904229928d941ce1db181b991948387ab463cd ]
The commit 8bb649ee1da3 ("io_uring: remove ring quiesce for
io_uring_register") removed the worklow relying on reinit/resurrection
of the percpu_ref, hence, initialization with that requested is a relic.
This is based on code review, this causes no real bug (and theoretically
can't). Technically it's a revert of commit 214828962dea ("io_uring:
initialize percpu refcounters using PERCU_REF_ALLOW_REINIT") but since
the flag omission is now justified, I'm not making this a revert.
Fixes: 8bb649ee1da3 ("io_uring: remove ring quiesce for io_uring_register")
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index f429b68d1fc2..27ce532c6c8d 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1701,7 +1701,7 @@ static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p) ctx->dummy_ubuf->ubuf = -1UL; if (percpu_ref_init(&ctx->refs, io_ring_ctx_ref_free, - PERCPU_REF_ALLOW_REINIT, GFP_KERNEL)) + 0, GFP_KERNEL)) goto err; ctx->flags = p->flags; |