aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/delayacct.h
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 /include/linux/delayacct.h
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 'include/linux/delayacct.h')
-rw-r--r--include/linux/delayacct.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index 7e8b6011b8f3..8a284cc6fd5f 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -80,9 +80,7 @@ static inline void delayacct_blkio_end(void)
80static inline int delayacct_add_tsk(struct taskstats *d, 80static inline int delayacct_add_tsk(struct taskstats *d,
81 struct task_struct *tsk) 81 struct task_struct *tsk)
82{ 82{
83 if (likely(!delayacct_on)) 83 if (likely(!delayacct_on) || !tsk->delays)
84 return -EINVAL;
85 if (!tsk->delays)
86 return 0; 84 return 0;
87 return __delayacct_add_tsk(d, tsk); 85 return __delayacct_add_tsk(d, tsk);
88} 86}