summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-02-11 18:28:20 +0000
committerJens Axboe <axboe@kernel.dk>2021-02-11 11:40:40 -0700
commit6e833d538b3123767393c987d11c40b7728b3f79 (patch)
tree640801b72cb16baae7bb37cb41d06a2e58a966fe /fs/io_uring.c
parent3c1a2ead915c1bcb7b1f9e902469ea0ee1f7857f (diff)
downloadlinux-stable-6e833d538b3123767393c987d11c40b7728b3f79.tar.gz
linux-stable-6e833d538b3123767393c987d11c40b7728b3f79.tar.bz2
linux-stable-6e833d538b3123767393c987d11c40b7728b3f79.zip
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 <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 8be7a24aa10e..fe06ca43e832 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);
}