···677677 mutex_unlock(&ctx->uring_lock);678678}679679680680-/* can be called by any task */681681-static void io_put_task_remote(struct task_struct *task)682682-{683683- struct io_uring_task *tctx = task->io_uring;684684-685685- percpu_counter_sub(&tctx->inflight, 1);686686- if (unlikely(atomic_read(&tctx->in_cancel)))687687- wake_up(&tctx->wait);688688- put_task_struct(task);689689-}690690-691691-/* used by a task to put its own references */692692-static void io_put_task_local(struct task_struct *task)693693-{694694- task->io_uring->cached_refs++;695695-}696696-697680/* must to be called somewhat shortly after putting a request */698681static inline void io_put_task(struct task_struct *task)699682{700700- if (likely(task == current))701701- io_put_task_local(task);702702- else703703- io_put_task_remote(task);683683+ struct io_uring_task *tctx = task->io_uring;684684+685685+ if (likely(task == current)) {686686+ tctx->cached_refs++;687687+ } else {688688+ percpu_counter_sub(&tctx->inflight, 1);689689+ if (unlikely(atomic_read(&tctx->in_cancel)))690690+ wake_up(&tctx->wait);691691+ put_task_struct(task);692692+ }704693}705694706695void io_task_refs_refill(struct io_uring_task *tctx)