diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2024-03-13 15:52:40 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-03-13 14:50:42 -0600 |
commit | 2c5c0ba1179d31b0a030b45a16df6181d1bc3ea6 (patch) | |
tree | 926d5c339706da8a37b0a10b8fb0472ec3f1105f /io_uring | |
parent | cef59d1ea7170ec753182302645a0191c8aa3382 (diff) |
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>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index e7d7a456b489..48c8d74e86ab 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2696,13 +2696,9 @@ void io_mem_free(void *ptr) static void io_pages_free(struct page ***pages, int npages) { - struct page **page_array; + struct page **page_array = *pages; int i; - if (!pages) - return; - - page_array = *pages; if (!page_array) return; |