From: Pavel Begunkov Date: Fri, 8 Jan 2021 20:57:22 +0000 (+0000) Subject: io_uring: io_rw_reissue lockdep annotations X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=55e6ac1e1f31c7f678d9f3c8d54c6f102e5f1550;p=linux.git io_uring: io_rw_reissue lockdep annotations We expect io_rw_reissue() to take place only during submission with uring_lock held. Add a lockdep annotation to check that invariant. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index cb57e0360fcbb..55ba1922a3497 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2692,6 +2692,8 @@ static bool io_rw_reissue(struct io_kiocb *req, long res) if ((res != -EAGAIN && res != -EOPNOTSUPP) || io_wq_current_is_worker()) return false; + lockdep_assert_held(&req->ctx->uring_lock); + ret = io_sq_thread_acquire_mm_files(req->ctx, req); if (io_resubmit_prep(req, ret)) {