io_uring: fix invalid ctx->sq_thread_idle
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 10 Mar 2021 13:13:53 +0000 (13:13 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 14:29:59 +0000 (07:29 -0700)
commit78d7f6ba82edb7f8763390982be29051c4216772
treed51954e554ee3f20efe5f3471896c24370ddd327
parente22bc9b481a90d7898984ea17621f04a653e2cd1
io_uring: fix invalid ctx->sq_thread_idle

We have to set ctx->sq_thread_idle before adding a ring to an SQ task,
otherwise sqd races for seeing zero and accounting it as such.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c