Jens Axboe <axboe@xxxxxxxxx> writes: > This is the last holdout which does odd page checking, convert it to > vmap just like what is done for the non-mmap path. > > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> > --- > io_uring/io_uring.c | 40 +++++++++------------------------------- > 1 file changed, 9 insertions(+), 31 deletions(-) > > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c > index 29d0c1764aab..67c93b290ed9 100644 > --- a/io_uring/io_uring.c > +++ b/io_uring/io_uring.c > @@ -63,7 +63,6 @@ > #include <linux/sched/mm.h> > #include <linux/uaccess.h> > #include <linux/nospec.h> > -#include <linux/highmem.h> > #include <linux/fsnotify.h> > #include <linux/fadvise.h> > #include <linux/task_work.h> > @@ -2650,7 +2649,7 @@ static void *__io_uaddr_map(struct page ***pages, unsigned short *npages, > struct page **page_array; > unsigned int nr_pages; > void *page_addr; > - int ret, i, pinned; > + int ret, pinned; > > *npages = 0; > > @@ -2659,8 +2658,6 @@ static void *__io_uaddr_map(struct page ***pages, unsigned short *npages, > > nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; > if (nr_pages > USHRT_MAX) > - return ERR_PTR(-EINVAL); > - page_array = kvmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL); > if (!page_array) > return ERR_PTR(-ENOMEM); That's not right. ;-) It gets fixed up (removed) in the next patch. -Jeff