diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/taskstats_kern.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 16894b7edcc8..a437ca0d226b 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -49,17 +49,8 @@ static inline void taskstats_tgid_alloc(struct signal_struct *sig) | |||
49 | 49 | ||
50 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 50 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
51 | { | 51 | { |
52 | struct taskstats *stats = NULL; | 52 | if (sig->stats) |
53 | unsigned long flags; | 53 | kmem_cache_free(taskstats_cache, sig->stats); |
54 | |||
55 | spin_lock_irqsave(&sig->stats_lock, flags); | ||
56 | if (sig->stats) { | ||
57 | stats = sig->stats; | ||
58 | sig->stats = NULL; | ||
59 | } | ||
60 | spin_unlock_irqrestore(&sig->stats_lock, flags); | ||
61 | if (stats) | ||
62 | kmem_cache_free(taskstats_cache, stats); | ||
63 | } | 54 | } |
64 | 55 | ||
65 | extern void taskstats_exit_alloc(struct taskstats **, unsigned int *); | 56 | extern void taskstats_exit_alloc(struct taskstats **, unsigned int *); |