[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>
This commit is contained in:
committed by
Linus Torvalds
parent
15a647eba9
commit
7d94dddd43
@@ -80,9 +80,7 @@ static inline void delayacct_blkio_end(void)
|
||||
static inline int delayacct_add_tsk(struct taskstats *d,
|
||||
struct task_struct *tsk)
|
||||
{
|
||||
if (likely(!delayacct_on))
|
||||
return -EINVAL;
|
||||
if (!tsk->delays)
|
||||
if (likely(!delayacct_on) || !tsk->delays)
|
||||
return 0;
|
||||
return __delayacct_add_tsk(d, tsk);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user