Commit 6e833d53 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: clean up io_req_free_batch_finish()

io_req_free_batch_finish() is final and does not permit struct req_batch
to be reused without re-init. To be more consistent don't clear ->task
there.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3c1a2ead
...@@ -2397,10 +2397,8 @@ static inline void io_init_req_batch(struct req_batch *rb) ...@@ -2397,10 +2397,8 @@ static inline void io_init_req_batch(struct req_batch *rb)
static void io_req_free_batch_finish(struct io_ring_ctx *ctx, static void io_req_free_batch_finish(struct io_ring_ctx *ctx,
struct req_batch *rb) struct req_batch *rb)
{ {
if (rb->task) { if (rb->task)
io_put_task(rb->task, rb->task_refs); io_put_task(rb->task, rb->task_refs);
rb->task = NULL;
}
if (rb->ctx_refs) if (rb->ctx_refs)
percpu_ref_put_many(&ctx->refs, rb->ctx_refs); percpu_ref_put_many(&ctx->refs, rb->ctx_refs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment