aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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}