From: Pavel Begunkov Date: Thu, 11 Feb 2021 18:28:20 +0000 (+0000) Subject: io_uring: clean up io_req_free_batch_finish() X-Git-Tag: accepted/tizen/unified/20230118.172025~7716^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e833d538b3123767393c987d11c40b7728b3f79;p=platform%2Fkernel%2Flinux-rpi.git 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: Pavel Begunkov Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 8be7a24..fe06ca4 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -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, struct req_batch *rb) { - if (rb->task) { + if (rb->task) io_put_task(rb->task, rb->task_refs); - rb->task = NULL; - } if (rb->ctx_refs) percpu_ref_put_many(&ctx->refs, rb->ctx_refs); }