Skip to content

Commit 2c5c0ba

Browse files
isilenceaxboe
authored andcommitted
io_uring: simplify io_pages_free
We never pass a null (top-level) pointer, remove the check. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/0e1a46f9a5cd38e6876905e8030bdff9b0845e96.1710343154.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent cef59d1 commit 2c5c0ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

io_uring/io_uring.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,13 +2696,9 @@ void io_mem_free(void *ptr)
26962696

26972697
static void io_pages_free(struct page ***pages, int npages)
26982698
{
2699-
struct page **page_array;
2699+
struct page **page_array = *pages;
27002700
int i;
27012701

2702-
if (!pages)
2703-
return;
2704-
2705-
page_array = *pages;
27062702
if (!page_array)
27072703
return;
27082704

0 commit comments

Comments
 (0)