aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/delayacct.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/delayacct.h')
-rw-r--r--include/linux/delayacct.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h
index 11487b6e7127..561e2a77805c 100644
--- a/include/linux/delayacct.h
+++ b/include/linux/delayacct.h
@@ -59,10 +59,14 @@ static inline void delayacct_tsk_init(struct task_struct *tsk)
59 __delayacct_tsk_init(tsk); 59 __delayacct_tsk_init(tsk);
60} 60}
61 61
62static inline void delayacct_tsk_exit(struct task_struct *tsk) 62/* Free tsk->delays. Called from bad fork and __put_task_struct
63 * where there's no risk of tsk->delays being accessed elsewhere
64 */
65static inline void delayacct_tsk_free(struct task_struct *tsk)
63{ 66{
64 if (tsk->delays) 67 if (tsk->delays)
65 __delayacct_tsk_exit(tsk); 68 kmem_cache_free(delayacct_cache, tsk->delays);
69 tsk->delays = NULL;
66} 70}
67 71
68static inline void delayacct_blkio_start(void) 72static inline void delayacct_blkio_start(void)
@@ -101,7 +105,7 @@ static inline void delayacct_init(void)
101{} 105{}
102static inline void delayacct_tsk_init(struct task_struct *tsk) 106static inline void delayacct_tsk_init(struct task_struct *tsk)
103{} 107{}
104static inline void delayacct_tsk_exit(struct task_struct *tsk) 108static inline void delayacct_tsk_free(struct task_struct *tsk)
105{} 109{}
106static inline void delayacct_blkio_start(void) 110static inline void delayacct_blkio_start(void)
107{} 111{}