aboutsummaryrefslogtreecommitdiff
path: root/include/linux/delayacct.h
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2006-08-02 14:15:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-08-02 14:15:39 -0400
commit02b311bce9fc87987a123adc3e6a2d0a2caa70e2 (patch)
treeba5c42ecf98de1a1a72f4bd5d94dc729ca8196c9 /include/linux/delayacct.h
parent8f0f850e240df5bea027caeb1723142c50e37e57 (diff)
parent49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff)
Merge branch 'from-linus' into upstream
Diffstat (limited to 'include/linux/delayacct.h')
-rw-r--r--include/linux/delayacct.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index 7e8b6011b8f..11487b6e712 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -55,7 +55,7 @@ static inline void delayacct_tsk_init(struct task_struct *tsk)
{
/* reinitialize in case parent's non-null pointer was dup'ed*/
tsk->delays = NULL;
- if (unlikely(delayacct_on))
+ if (delayacct_on)
__delayacct_tsk_init(tsk);
}
@@ -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 (!delayacct_on || !tsk->delays)
return 0;
return __delayacct_add_tsk(d, tsk);
}