treewide: replace '---help---' in Kconfig files with 'help'
[linux-2.6-microblaze.git] / mm / mincore.c
index 0e6dd99..453ff11 100644 (file)
@@ -17,9 +17,9 @@
 #include <linux/swapops.h>
 #include <linux/shmem_fs.h>
 #include <linux/hugetlb.h>
+#include <linux/pgtable.h>
 
 #include <linux/uaccess.h>
-#include <asm/pgtable.h>
 
 static int mincore_hugetlb(pte_t *pte, unsigned long hmask, unsigned long addr,
                        unsigned long end, struct mm_walk *walk)
@@ -284,9 +284,9 @@ SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len,
                 * Do at most PAGE_SIZE entries per iteration, due to
                 * the temporary buffer size.
                 */
-               down_read(&current->mm->mmap_sem);
+               mmap_read_lock(current->mm);
                retval = do_mincore(start, min(pages, PAGE_SIZE), tmp);
-               up_read(&current->mm->mmap_sem);
+               mmap_read_unlock(current->mm);
 
                if (retval <= 0)
                        break;