]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/exit.c
mtd: gpmi: add subpage read support
[karo-tx-linux.git] / kernel / exit.c
index 5281522ba7be2d898ac0a64c2b49bff72cc1b816..81b3d6789ee8caa24cd37ed7c55e1fd560f6ad41 100644 (file)
@@ -791,6 +791,8 @@ void do_exit(long code)
        exit_shm(tsk);
        exit_files(tsk);
        exit_fs(tsk);
+       if (group_dead)
+               disassociate_ctty(1);
        exit_task_namespaces(tsk);
        exit_task_work(tsk);
        check_stack_usage();
@@ -806,13 +808,9 @@ void do_exit(long code)
 
        cgroup_exit(tsk, 1);
 
-       if (group_dead)
-               disassociate_ctty(1);
-
        module_put(task_thread_info(tsk)->exec_domain->module);
 
        proc_exit_connector(tsk);
-
        /*
         * FIXME: do that only when needed, using sched_exit tracepoint
         */