OSDN Git Service

io_uring: ensure only sqo_task has file notes
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 25 Jan 2021 11:42:20 +0000 (11:42 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Feb 2021 17:02:43 +0000 (10:02 -0700)
commitecfc8492820732be652146280912554ced62c32b
treedcce34147e2a673c4937ade543294fdca13b7001
parent0bead8cd39b9c9c7c4e902018ccf129107ac50ef
io_uring: ensure only sqo_task has file notes

For SQPOLL io_uring we want to have only one file note held by
sqo_task. Add a warning to make sure it holds. It's deep in
io_uring_add_task_file() out of hot path, so shouldn't hurt.

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