Merge tag 'mm-stable-2023-08-28-18-26' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / io_uring / io_uring.c
index 93db3e4e7b68809f1d06b603c084d28bdd8a7a34..bb201503f0dbaed4dc97de9847f0e3aa5fa5cf75 100644 (file)
@@ -2643,14 +2643,10 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
 
 static void io_mem_free(void *ptr)
 {
-       struct page *page;
-
        if (!ptr)
                return;
 
-       page = virt_to_head_page(ptr);
-       if (put_page_testzero(page))
-               free_compound_page(page);
+       folio_put(virt_to_folio(ptr));
 }
 
 static void io_pages_free(struct page ***pages, int npages)