On 1/9/19 5:12 AM, Christoph Hellwig wrote:
On Tue, Jan 08, 2019 at 09:56:39AM -0700, Jens Axboe wrote:
quoted
In preparation from having pre-allocated requests, that we then just
need to initialize before use.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
fs/io_uring.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index afbaebb63012..11d045f0f799 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -202,6 +202,14 @@ static struct io_uring_event *io_peek_cqring(struct io_ring_ctx *ctx)
return &ring->events[tail & ctx->cq_ring.ring_mask];
}
+static void io_req_init(struct io_ring_ctx *ctx, struct io_kiocb *req)
+{
+ percpu_ref_get(&ctx->refs);
+ req->ki_ctx = ctx;
+ INIT_LIST_HEAD(&req->ki_list);
+ req->ki_flags = 0;
We still only have a single caller of this in the final tree, and
I don't think this function helps. So I'd just drop the patch.
Dropped
--
Jens Axboe