io_uring: turn implicit assumptions into a warning
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 5 Apr 2024 15:50:03 +0000 (16:50 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 15 Apr 2024 14:10:26 +0000 (08:10 -0600)
commitde96e9ae69a134c009a6d9a7ca182fa67067ecac
tree54313a2b311bddaea262206a63408e309c65349c
parentf39130004d3a9155d113284c19b5a7c2eccb43fe
io_uring: turn implicit assumptions into a warning

io_req_complete_post() is now io-wq only and shouldn't be used outside
of it, i.e. it relies that io-wq holds a ref for the request as
explained in a comment below. Let's add a warning to enforce the
assumption and make sure nobody would try to do anything weird.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1013b60c35d431d0698cafbc53c06f5917348c20.1712331455.git.asml.silence@gmail.com
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c