lightnvm: missing free on init error
[linux-2.6-block.git] / mm / util.c
index 68ff8a5361e79a30233fe9ecc4b26b09e614e1b8..9af1c12b310c7f092f030fc1a4303c287724b0a6 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);