- kernel threads may have null p->signal

- remove some deoptimising inlines

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 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-11-07 22:38:06.440433200 -0800
+++ 25-akpm/kernel/sched.c	2004-11-07 22:38:06.447432136 -0800
@@ -2280,7 +2280,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;
 
@@ -2301,7 +2301,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;
 
@@ -2333,7 +2333,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);
 
@@ -2361,7 +2362,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. */
_