]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/delayacct.h
V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install
[linux-2.6-omap-h63xx.git] / include / linux / delayacct.h
index 11487b6e7127ff68ec12cada74c672af72efcffb..561e2a77805c582fdebcd3d588a222d8adec9a6c 100644 (file)
@@ -59,10 +59,14 @@ static inline void delayacct_tsk_init(struct task_struct *tsk)
                __delayacct_tsk_init(tsk);
 }
 
-static inline void delayacct_tsk_exit(struct task_struct *tsk)
+/* Free tsk->delays. Called from bad fork and __put_task_struct
+ * where there's no risk of tsk->delays being accessed elsewhere
+ */
+static inline void delayacct_tsk_free(struct task_struct *tsk)
 {
        if (tsk->delays)
-               __delayacct_tsk_exit(tsk);
+               kmem_cache_free(delayacct_cache, tsk->delays);
+       tsk->delays = NULL;
 }
 
 static inline void delayacct_blkio_start(void)
@@ -101,7 +105,7 @@ static inline void delayacct_init(void)
 {}
 static inline void delayacct_tsk_init(struct task_struct *tsk)
 {}
-static inline void delayacct_tsk_exit(struct task_struct *tsk)
+static inline void delayacct_tsk_free(struct task_struct *tsk)
 {}
 static inline void delayacct_blkio_start(void)
 {}