[PATCH] taskstats: cleanup do_exit() path
do_exit: taskstats_exit_alloc() ... taskstats_exit_send() taskstats_exit_free() I think this is not good, let it be a single function exported to the core kernel, taskstats_exit(), which does alloc + send + free itself. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Shailabh Nagar <nagar@watson.ibm.com> Cc: Jay Lan <jlan@engr.sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
128fb95650
commit
115085ea07
@ -850,9 +850,7 @@ static void exit_notify(struct task_struct *tsk)
|
||||
fastcall NORET_TYPE void do_exit(long code)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
struct taskstats *tidstats;
|
||||
int group_dead;
|
||||
unsigned int mycpu;
|
||||
|
||||
profile_task_exit(tsk);
|
||||
|
||||
@ -890,8 +888,6 @@ fastcall NORET_TYPE void do_exit(long code)
|
||||
current->comm, current->pid,
|
||||
preempt_count());
|
||||
|
||||
taskstats_exit_alloc(&tidstats, &mycpu);
|
||||
|
||||
acct_update_integrals(tsk);
|
||||
if (tsk->mm) {
|
||||
update_hiwater_rss(tsk->mm);
|
||||
@ -911,8 +907,8 @@ fastcall NORET_TYPE void do_exit(long code)
|
||||
#endif
|
||||
if (unlikely(tsk->audit_context))
|
||||
audit_free(tsk);
|
||||
taskstats_exit_send(tsk, tidstats, group_dead, mycpu);
|
||||
taskstats_exit_free(tidstats);
|
||||
|
||||
taskstats_exit(tsk, group_dead);
|
||||
|
||||
exit_mm(tsk);
|
||||
|
||||
|
Reference in New Issue
Block a user