]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/io_uring.c
mm/sparse.c: fix ALIGN() without power of 2 in sparse_buffer_alloc()
[linux.git] / fs / io_uring.c
index 0dadbdbead0fbfef8b0f2373756b3254832ada53..f83de4c6a826e1d146dc389517069efcd2e02b4d 100644 (file)
@@ -3319,7 +3319,7 @@ static int io_uring_mmap(struct file *file, struct vm_area_struct *vma)
        }
 
        page = virt_to_head_page(ptr);
-       if (sz > (PAGE_SIZE << compound_order(page)))
+       if (sz > page_size(page))
                return -EINVAL;
 
        pfn = virt_to_phys(ptr) >> PAGE_SHIFT;