[PATCH] USB: fix endian issues in yealink driver.
[pandora-kernel.git] / kernel / fork.c
index 2c78068..7e1ead9 100644 (file)
@@ -208,8 +208,10 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
                struct file *file;
 
                if (mpnt->vm_flags & VM_DONTCOPY) {
+                       long pages = vma_pages(mpnt);
+                       mm->total_vm -= pages;
                        __vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file,
-                                                       -vma_pages(mpnt));
+                                                               -pages);
                        continue;
                }
                charge = 0;
@@ -992,6 +994,9 @@ static task_t *copy_process(unsigned long clone_flags,
         * of CLONE_PTRACE.
         */
        clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE);
+#ifdef TIF_SYSCALL_EMU
+       clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);
+#endif
 
        /* Our parent execution domain becomes current domain
           These must match for thread signalling to apply */
@@ -1090,6 +1095,11 @@ static task_t *copy_process(unsigned long clone_flags,
                spin_unlock(&current->sighand->siglock);
        }
 
+       /*
+        * inherit ioprio
+        */
+       p->ioprio = current->ioprio;
+
        SET_LINKS(p);
        if (unlikely(p->ptrace & PT_PTRACED))
                __ptrace_link(p, current->parent);