Merge tag 'for-5.4/io_uring-2019-09-27' of git://git.kernel.dk/linux-block
[platform/kernel/linux-starfive.git] / fs / io_uring.c
index c934f91..aa8ac55 100644 (file)
@@ -3558,7 +3558,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;