aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorShailabh Nagar <nagar@watson.ibm.com>2006-07-30 06:03:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 16:28:37 -0400
commit7d94dddd438bcba97db44f120da39bb001b5249f (patch)
treeedd737ba4e06ec086f0296a7d99a13e240c7ab93 /kernel
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')
-rw-r--r--kernel/taskstats.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index f45179ce028e..b4c737a11408 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)
177static int fill_pid(pid_t pid, struct task_struct *pidtsk, 177static int fill_pid(pid_t pid, struct task_struct *pidtsk,
178 struct taskstats *stats) 178 struct taskstats *stats)
179{ 179{
180 int rc; 180 int rc = 0;
181 struct task_struct *tsk = pidtsk; 181 struct task_struct *tsk = pidtsk;
182 182
183 if (!pidtsk) { 183 if (!pidtsk) {
@@ -196,12 +196,10 @@ static int fill_pid(pid_t pid, struct task_struct *pidtsk,
196 * Each accounting subsystem adds calls to its functions to 196 * Each accounting subsystem adds calls to its functions to
197 * fill in relevant parts of struct taskstsats as follows 197 * fill in relevant parts of struct taskstsats as follows
198 * 198 *
199 * rc = per-task-foo(stats, tsk); 199 * per-task-foo(stats, tsk);
200 * if (rc)
201 * goto err;
202 */ 200 */
203 201
204 rc = delayacct_add_tsk(stats, tsk); 202 delayacct_add_tsk(stats, tsk);
205 stats->version = TASKSTATS_VERSION; 203 stats->version = TASKSTATS_VERSION;
206 204
207 /* Define err: label here if needed */ 205 /* Define err: label here if needed */