mm: replace get_user_pages() write/force parameters with gup_flags
[linux-2.6-block.git] / arch / x86 / mm / mpx.c
index ef05755a190063cdf79210f7ac164aef1a0f4ec5..e4f800999b32dc94d5ba1a1283591649a818fbb7 100644 (file)
@@ -544,10 +544,9 @@ static int mpx_resolve_fault(long __user *addr, int write)
 {
        long gup_ret;
        int nr_pages = 1;
-       int force = 0;
 
-       gup_ret = get_user_pages(current, current->mm, (unsigned long)addr,
-                                nr_pages, write, force, NULL, NULL);
+       gup_ret = get_user_pages((unsigned long)addr, nr_pages,
+                       write ? FOLL_WRITE : 0, NULL, NULL);
        /*
         * get_user_pages() returns number of pages gotten.
         * 0 means we failed to fault in and get anything,
@@ -728,14 +727,14 @@ static inline unsigned long bd_entry_virt_space(struct mm_struct *mm)
 
        /*
         * This covers 32-bit emulation as well as 32-bit kernels
-        * running on 64-bit harware.
+        * running on 64-bit hardware.
         */
        if (!is_64bit_mm(mm))
                return (4ULL * GB) / MPX_BD_NR_ENTRIES_32;
 
        /*
         * 'x86_virt_bits' returns what the hardware is capable
-        * of, and returns the full >32-bit adddress space when
+        * of, and returns the full >32-bit address space when
         * running 32-bit kernels on 64-bit hardware.
         */
        virt_space = (1ULL << boot_cpu_data.x86_virt_bits);