path: root/kernel/taskstats.c
diff options
authorShailabh Nagar <nagar@watson.ibm.com>2006-07-30 03:03:10 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 13:28:37 -0700
commit7d94dddd438bcba97db44f120da39bb001b5249f (patch)
treeedd737ba4e06ec086f0296a7d99a13e240c7ab93 /kernel/taskstats.c
parent15a647eba94c3da27ccc666bea72e7cca06b2d19 (diff)
[PATCH] make taskstats sending completely independent of delay accounting on/off status
Complete the separation of delay accounting and taskstats by ignoring the return value of delay accounting functions that fill in parts of taskstats before it is sent out (either in response to a command or as part of a task exit). Also make delayacct_add_tsk return silently when delay accounting is turned off rather than treat it as an error. Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/taskstats.c')
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index f45179ce028..b4c737a1140 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -177,7 +177,7 @@ static int send_cpu_listeners(struct sk_buff *skb, unsigned int cpu)
static int fill_pid(pid_t pid, struct task_struct *pidtsk,
struct taskstats *stats)
- int rc;
+ int rc = 0;
struct task_struct *tsk = pidtsk;
if (!pidtsk) {
@@ -196,12 +196,10 @@ static int fill_pid(pid_t pid, struct task_struct *pidtsk,
* Each accounting subsystem adds calls to its functions to
* fill in relevant parts of struct taskstsats as follows
- * rc = per-task-foo(stats, tsk);
- * if (rc)
- * goto err;
+ * per-task-foo(stats, tsk);
- rc = delayacct_add_tsk(stats, tsk);
+ delayacct_add_tsk(stats, tsk);
stats->version = TASKSTATS_VERSION;
/* Define err: label here if needed */