]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: patch up IOPOLL overflow_flush sync
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 Jan 2021 20:36:36 +0000 (20:36 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 4 Jan 2021 22:22:29 +0000 (15:22 -0700)
commit771b297e8d8eaa887590b28fdbe6e7182d21f8da
tree7e2bd834d7cb63dc978ac55c732fa2563caf8db3
parent2e60ac27a7bbe627f61282fb769d87a490810072
io_uring: patch up IOPOLL overflow_flush sync

IOPOLL skips completion locking but keeps it under uring_lock, thus
io_cqring_overflow_flush() and so io_cqring_events() need additional
locking with uring_lock in some cases for IOPOLL.

Remove __io_cqring_overflow_flush() from io_cqring_events(), introduce a
wrapper around flush doing needed synchronisation and call it by hand.

Cc: stable@vger.kernel.org # 5.5+
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c