Skip to content

Commit

Permalink
io_uring: remove redundant args from cache_free
Browse files Browse the repository at this point in the history
We don't use @tsk argument of io_req_cache_free(), remove it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6a28b4a58ee0aaf0db98e2179b9c9f06f9b0cca1.1628536684.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Aug 23, 2021
1 parent c34b025 commit 7255834
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -8622,13 +8622,11 @@ static void io_destroy_buffers(struct io_ring_ctx *ctx)
__io_remove_buffers(ctx, buf, index, -1U);
}

static void io_req_cache_free(struct list_head *list, struct task_struct *tsk)
static void io_req_cache_free(struct list_head *list)
{
struct io_kiocb *req, *nxt;

list_for_each_entry_safe(req, nxt, list, compl.list) {
if (tsk && req->task != tsk)
continue;
list_del(&req->compl.list);
kmem_cache_free(req_cachep, req);
}
Expand All @@ -8648,7 +8646,7 @@ static void io_req_caches_free(struct io_ring_ctx *ctx)
}

io_flush_cached_locked_reqs(ctx, cs);
io_req_cache_free(&cs->free_list, NULL);
io_req_cache_free(&cs->free_list);
mutex_unlock(&ctx->uring_lock);
}

Expand Down

0 comments on commit 7255834

Please sign in to comment.