Skip to content

Commit f3176c8

Browse files
committed
Revert "io_uring: grab RCU read lock marking task run"
This reverts commit ed64f5c. Since commit: 648790e ("io_uring: restore RCU read section in io_req_local_work_add()") io_ctx_mark_taskrun() is only ever called with the RCU read lock already held, like previously. Hence's there's no need for this commit anymore, which grabbed the RCU read lock inside io_ctx_mark_taskrun(). Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 648790e commit f3176c8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

io_uring/tw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ void tctx_task_work(struct callback_head *cb)
139139
*/
140140
static void io_ctx_mark_taskrun(struct io_ring_ctx *ctx)
141141
{
142+
lockdep_assert_in_rcu_read_lock();
143+
142144
if (ctx->flags & IORING_SETUP_TASKRUN_FLAG) {
143-
struct io_rings *rings;
145+
struct io_rings *rings = rcu_dereference(ctx->rings_rcu);
144146

145-
guard(rcu)();
146-
rings = rcu_dereference(ctx->rings_rcu);
147147
atomic_or(IORING_SQ_TASKRUN, &rings->sq_flags);
148148
}
149149
}

0 commit comments

Comments
 (0)