Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32914
b: refs/heads/master
c: 7d94ddd
h: refs/heads/master
v: v3
  • Loading branch information
Shailabh Nagar authored and Linus Torvalds committed Jul 31, 2006
1 parent 6dcfe14 commit 63ef005
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15a647eba94c3da27ccc666bea72e7cca06b2d19
refs/heads/master: 7d94dddd438bcba97db44f120da39bb001b5249f
4 changes: 1 addition & 3 deletions trunk/include/linux/delayacct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 3 additions & 5 deletions trunk/kernel/taskstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 */
Expand Down

0 comments on commit 63ef005

Please sign in to comment.