diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-07-12 21:52:37 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-24 18:41:06 -0600 |
commit | e70cb60893ca64b7df06864aa16c1cf6d6c671db (patch) | |
tree | fabc1384f3e0dce1c0fc17f5b4b7612901bb8752 /io_uring/io_uring.c | |
parent | e02b66512738db161e83634255e9826c8cb51336 (diff) |
io_uring: export io_put_task()
Make io_put_task() available to non-core parts of io_uring, we'll need
it for notification infrastructure.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3686807d4c03b72e389947b0e8692d4d44334ef0.1657643355.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r-- | io_uring/io_uring.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 4b3fd645d023..7795cfedf6bf 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -608,7 +608,7 @@ static bool io_cqring_overflow_flush(struct io_ring_ctx *ctx) return ret; } -static void __io_put_task(struct task_struct *task, int nr) +void __io_put_task(struct task_struct *task, int nr) { struct io_uring_task *tctx = task->io_uring; @@ -618,15 +618,6 @@ static void __io_put_task(struct task_struct *task, int nr) put_task_struct_many(task, nr); } -/* must to be called somewhat shortly after putting a request */ -static inline void io_put_task(struct task_struct *task, int nr) -{ - if (likely(task == current)) - task->io_uring->cached_refs += nr; - else - __io_put_task(task, nr); -} - static void io_task_refs_refill(struct io_uring_task *tctx) { unsigned int refill = -tctx->cached_refs + IO_TCTX_REFS_CACHE_NR; |