Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / arch / s390 / mm / fault.c
index 833e836..e5e119f 100644 (file)
@@ -19,9 +19,9 @@
 #include <linux/ptrace.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
+#include <linux/compat.h>
 #include <linux/smp.h>
 #include <linux/kdebug.h>
-#include <linux/smp_lock.h>
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/module.h>
@@ -239,7 +239,7 @@ static int signal_return(struct mm_struct *mm, struct pt_regs *regs,
        up_read(&mm->mmap_sem);
        clear_tsk_thread_flag(current, TIF_SINGLE_STEP);
 #ifdef CONFIG_COMPAT
-       compat = test_tsk_thread_flag(current, TIF_31BIT);
+       compat = is_compat_task();
        if (compat && instruction == 0x0a77)
                sys32_sigreturn();
        else if (compat && instruction == 0x0aad)
@@ -351,7 +351,7 @@ good_area:
         * make sure we exit gracefully rather than endlessly redo
         * the fault.
         */
-       fault = handle_mm_fault(mm, vma, address, write);
+       fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0);
        if (unlikely(fault & VM_FAULT_ERROR)) {
                if (fault & VM_FAULT_OOM) {
                        up_read(&mm->mmap_sem);