- kernel threads may have null p->signal - remove some deoptimising inlines Signed-off-by: Andrew Morton --- 25-akpm/kernel/sched.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff -puN kernel/sched.c~cputime-introduce-cputime-fix kernel/sched.c --- 25/kernel/sched.c~cputime-introduce-cputime-fix 2004-10-27 22:41:31.311696984 -0700 +++ 25-akpm/kernel/sched.c 2004-10-27 22:42:14.757092280 -0700 @@ -2275,7 +2275,7 @@ static inline void account_it_virt(struc * @p: the process that the cpu time gets accounted to * @cputime: the cpu time spent in user and kernel space since the last update */ -static inline void account_it_prof(struct task_struct *p, cputime_t cputime) +static void account_it_prof(struct task_struct *p, cputime_t cputime) { cputime_t it_prof = p->it_prof_value; @@ -2296,7 +2296,7 @@ static inline void account_it_prof(struc * @p: the process that the cpu time gets accounted to * @cputime: the cpu time spent in user and kernel space since the last update */ -static inline void check_rlimit(struct task_struct *p, cputime_t cputime) +static void check_rlimit(struct task_struct *p, cputime_t cputime) { cputime_t total, tmp; @@ -2328,7 +2328,8 @@ void account_user_time(struct task_struc p->utime = cputime_add(p->utime, cputime); /* Check for signals (SIGVTALRM, SIGPROF, SIGXCPU & SIGKILL). */ - check_rlimit(p, cputime); + if (likely(p->signal)) + check_rlimit(p, cputime); account_it_virt(p, cputime); account_it_prof(p, cputime); @@ -2356,7 +2357,8 @@ void account_system_time(struct task_str p->stime = cputime_add(p->stime, cputime); /* Check for signals (SIGPROF, SIGXCPU & SIGKILL). */ - check_rlimit(p, cputime); + if (likely(p->signal)) + check_rlimit(p, cputime); account_it_prof(p, cputime); /* Add system time to cpustat. */ _