]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/zcrx: remove duplicated freelist init
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 20 Apr 2025 09:31:15 +0000 (10:31 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Apr 2025 11:11:40 +0000 (05:11 -0600)
Several lines below we already initialise the freelist, don't do it
twice.

Reviewed-by: David Wei <dw@davidwei.uk>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/71b07c4e00d1db65899d1ed8d603d961fe7d1c28.1745141261.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c

index fe86606b9f304d8e0f954fefbd1a12eb63ea0c2b..79f58c94494b07197030a0d8089cd9dcd2a56f99 100644 (file)
@@ -245,9 +245,6 @@ static int io_zcrx_create_area(struct io_zcrx_ifq *ifq,
        if (!area->freelist)
                goto err;
 
-       for (i = 0; i < nr_iovs; i++)
-               area->freelist[i] = i;
-
        area->user_refs = kvmalloc_array(nr_iovs, sizeof(area->user_refs[0]),
                                        GFP_KERNEL | __GFP_ZERO);
        if (!area->user_refs)