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, 25 Jan 2021 16:07:15 +0000 (09:07 -0700)
commit31b12e2732384d6f252d06d00a302a267cf132d3
treee33e4bf22ba775f0f354c1923ec5b075582f6904
parent5ee63da477b1fd2f50164ee84c69d59921e4da2e
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