]> err.no Git - linux-2.6/blobdiff - fs/exec.c
[PATCH] splice: mark the io page as accessed
[linux-2.6] / fs / exec.c
index db0769447d33bf8743be643261d1ff8ab0fcbad0..0291a68a36261ada2dca60e411af634b1373bc1c 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -561,7 +561,7 @@ static int exec_mmap(struct mm_struct *mm)
        arch_pick_mmap_layout(mm);
        if (old_mm) {
                up_read(&old_mm->mmap_sem);
-               if (active_mm != old_mm) BUG();
+               BUG_ON(active_mm != old_mm);
                mmput(old_mm);
                return 0;
        }
@@ -725,8 +725,8 @@ static int de_thread(struct task_struct *tsk)
                current->group_leader = current;
                leader->group_leader = leader;
 
-               add_parent(current, current->parent);
-               add_parent(leader, leader->parent);
+               add_parent(current);
+               add_parent(leader);
                if (ptrace) {
                        current->ptrace = ptrace;
                        __ptrace_link(current, parent);
@@ -768,7 +768,6 @@ no_thread_group:
                /*
                 * Move our state over to newsighand and switch it in.
                 */
-               spin_lock_init(&newsighand->siglock);
                atomic_set(&newsighand->count, 1);
                memcpy(newsighand->action, oldsighand->action,
                       sizeof(newsighand->action));
@@ -785,7 +784,7 @@ no_thread_group:
                write_unlock_irq(&tasklist_lock);
 
                if (atomic_dec_and_test(&oldsighand->count))
-                       sighand_free(oldsighand);
+                       kmem_cache_free(sighand_cachep, oldsighand);
        }
 
        BUG_ON(!thread_group_leader(current));