Merge tag 'for-5.4/io_uring-2019-09-27' of git://git.kernel.dk/linux-block
[sfrench/cifs-2.6.git] / fs / io_uring.c
index c934f91c51e92222f7d9887034adf74b97e00062..aa8ac557493cb5e20f1ac78a87bb6b8e6e6f6fe8 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;