mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
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>
This commit is contained in:
parent
b1445e59cc
commit
55e6ac1e1f
1 changed files with 2 additions and 0 deletions
|
@ -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())
|
if ((res != -EAGAIN && res != -EOPNOTSUPP) || io_wq_current_is_worker())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
lockdep_assert_held(&req->ctx->uring_lock);
|
||||||
|
|
||||||
ret = io_sq_thread_acquire_mm_files(req->ctx, req);
|
ret = io_sq_thread_acquire_mm_files(req->ctx, req);
|
||||||
|
|
||||||
if (io_resubmit_prep(req, ret)) {
|
if (io_resubmit_prep(req, ret)) {
|
||||||
|
|
Loading…
Reference in a new issue