summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-01-08 21:57:22 +0100
committerJens Axboe <axboe@kernel.dk>2021-01-09 17:21:43 +0100
commit55e6ac1e1f31c7f678d9f3c8d54c6f102e5f1550 (patch)
tree950875a3acab38451777ea80330fb9ff4f5224f1 /fs
parentio_uring: synchronise ev_posted() with waitqueues (diff)
downloadlinux-55e6ac1e1f31c7f678d9f3c8d54c6f102e5f1550.tar.xz
linux-55e6ac1e1f31c7f678d9f3c8d54c6f102e5f1550.zip
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 <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index cb57e0360fcb..55ba1922a349 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)) {