]> git.karo-electronics.de Git - linux-beck.git/blobdiff - mm/mmap.c
mm: make do_mmap_pgoff return populate as a size in bytes, not as a bool
[linux-beck.git] / mm / mmap.c
index 39a3944e1658ad99519631833d1029c3b8e2247c..44bb4d86988456d0fb806a62445a798a7f307400 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1163,13 +1163,13 @@ static inline unsigned long round_hint_to_min(unsigned long hint)
 unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
                        unsigned long len, unsigned long prot,
                        unsigned long flags, unsigned long pgoff,
-                       bool *populate)
+                       unsigned long *populate)
 {
        struct mm_struct * mm = current->mm;
        struct inode *inode;
        vm_flags_t vm_flags;
 
-       *populate = false;
+       *populate = 0;
 
        /*
         * Does the application expect PROT_READ to imply PROT_EXEC?
@@ -1307,7 +1307,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
 
        addr = mmap_region(file, addr, len, vm_flags, pgoff);
        if (!IS_ERR_VALUE(addr) && (vm_flags & VM_POPULATE))
-               *populate = true;
+               *populate = len;
        return addr;
 }