io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT
authorRoman Gushchin <guro@fb.com>
Tue, 7 May 2019 17:01:48 +0000 (10:01 -0700)
committerDennis Zhou <dennis@kernel.org>
Thu, 9 May 2019 17:50:30 +0000 (10:50 -0700)
commit214828962dead0c698f92b60ef97ce3c5fc2c8fe
tree31ef85d837693d35843ff56d719d89db4950794f
parent09ed79d6d75f06cc963a78f25463251b0a758dc7
io_uring: initialize percpu refcounters using PERCU_REF_ALLOW_REINIT

Percpu reference counters should now be initialized with the
PERCPU_REF_ALLOW_REINIT in order to allow switching them to the
percpu mode from the atomic mode. This is exactly what
percpu_ref_reinit() called from __io_uring_register() is supposed to
do. So let's initialize percpu refcounters with the
PERCU_REF_ALLOW_REINIT flag.

Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
fs/io_uring.c