mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
io_uring: grab RCU read lock marking task run
Not required right now, as io_req_local_work_add() already calls this helper with the RCU read lock held. But in preparation for that not being the case, grab it locally. Reviewed-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
753f81b3b8
commit
ed64f5c546
|
|
@ -158,11 +158,11 @@ void tctx_task_work(struct callback_head *cb)
|
|||
*/
|
||||
static void io_ctx_mark_taskrun(struct io_ring_ctx *ctx)
|
||||
{
|
||||
lockdep_assert_in_rcu_read_lock();
|
||||
|
||||
if (ctx->flags & IORING_SETUP_TASKRUN_FLAG) {
|
||||
struct io_rings *rings = rcu_dereference(ctx->rings_rcu);
|
||||
struct io_rings *rings;
|
||||
|
||||
guard(rcu)();
|
||||
rings = rcu_dereference(ctx->rings_rcu);
|
||||
atomic_or(IORING_SQ_TASKRUN, &rings->sq_flags);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user