Merge tag 'pci-v4.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[cascardo/linux.git] / mm / util.c
index 68ff8a5..9af1c12 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -309,7 +309,7 @@ unsigned long vm_mmap(struct file *file, unsigned long addr,
 {
        if (unlikely(offset + PAGE_ALIGN(len) < offset))
                return -EINVAL;
-       if (unlikely(offset & ~PAGE_MASK))
+       if (unlikely(offset_in_page(offset)))
                return -EINVAL;
 
        return vm_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT);