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);
}
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) {
* 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 */