diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2010-03-10 18:23:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:39 -0500 |
commit | 4dd66e69d472f0ba5355a2529364d0db9a18a02b (patch) | |
tree | b0ea53215bbe61d678090385018de64821eb6831 | |
parent | a56704ef6b0c5796c9ff38cc78aa232dfb9644d7 (diff) |
copy_signal() cleanup: kill taskstats_tgid_init() and acct_init_pacct()
Kill unused functions taskstats_tgid_init() and acct_init_pacct() because
we don't use them anywhere after using kmem_cache_zalloc() in
copy_signal().
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/acct.h | 2 | ||||
-rw-r--r-- | include/linux/taskstats_kern.h | 7 | ||||
-rw-r--r-- | kernel/acct.c | 10 |
3 files changed, 0 insertions, 19 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h index 882dc7248766..93f46096ad4c 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -123,14 +123,12 @@ struct pacct_struct; | |||
123 | struct pid_namespace; | 123 | struct pid_namespace; |
124 | extern void acct_auto_close_mnt(struct vfsmount *m); | 124 | extern void acct_auto_close_mnt(struct vfsmount *m); |
125 | extern void acct_auto_close(struct super_block *sb); | 125 | extern void acct_auto_close(struct super_block *sb); |
126 | extern void acct_init_pacct(struct pacct_struct *pacct); | ||
127 | extern void acct_collect(long exitcode, int group_dead); | 126 | extern void acct_collect(long exitcode, int group_dead); |
128 | extern void acct_process(void); | 127 | extern void acct_process(void); |
129 | extern void acct_exit_ns(struct pid_namespace *); | 128 | extern void acct_exit_ns(struct pid_namespace *); |
130 | #else | 129 | #else |
131 | #define acct_auto_close_mnt(x) do { } while (0) | 130 | #define acct_auto_close_mnt(x) do { } while (0) |
132 | #define acct_auto_close(x) do { } while (0) | 131 | #define acct_auto_close(x) do { } while (0) |
133 | #define acct_init_pacct(x) do { } while (0) | ||
134 | #define acct_collect(x,y) do { } while (0) | 132 | #define acct_collect(x,y) do { } while (0) |
135 | #define acct_process() do { } while (0) | 133 | #define acct_process() do { } while (0) |
136 | #define acct_exit_ns(ns) do { } while (0) | 134 | #define acct_exit_ns(ns) do { } while (0) |
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 3398f4553269..b6523c1427ce 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -14,11 +14,6 @@ | |||
14 | extern struct kmem_cache *taskstats_cache; | 14 | extern struct kmem_cache *taskstats_cache; |
15 | extern struct mutex taskstats_exit_mutex; | 15 | extern struct mutex taskstats_exit_mutex; |
16 | 16 | ||
17 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
18 | { | ||
19 | sig->stats = NULL; | ||
20 | } | ||
21 | |||
22 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 17 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
23 | { | 18 | { |
24 | if (sig->stats) | 19 | if (sig->stats) |
@@ -30,8 +25,6 @@ extern void taskstats_init_early(void); | |||
30 | #else | 25 | #else |
31 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) | 26 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) |
32 | {} | 27 | {} |
33 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
34 | {} | ||
35 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 28 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
36 | {} | 29 | {} |
37 | static inline void taskstats_init_early(void) | 30 | static inline void taskstats_init_early(void) |
diff --git a/kernel/acct.c b/kernel/acct.c index a6605ca921b6..24f8c81fc48d 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -588,16 +588,6 @@ out: | |||
588 | } | 588 | } |
589 | 589 | ||
590 | /** | 590 | /** |
591 | * acct_init_pacct - initialize a new pacct_struct | ||
592 | * @pacct: per-process accounting info struct to initialize | ||
593 | */ | ||
594 | void acct_init_pacct(struct pacct_struct *pacct) | ||
595 | { | ||
596 | memset(pacct, 0, sizeof(struct pacct_struct)); | ||
597 | pacct->ac_utime = pacct->ac_stime = cputime_zero; | ||
598 | } | ||
599 | |||
600 | /** | ||
601 | * acct_collect - collect accounting information into pacct_struct | 591 | * acct_collect - collect accounting information into pacct_struct |
602 | * @exitcode: task exit code | 592 | * @exitcode: task exit code |
603 | * @group_dead: not 0, if this thread is the last one in the process. | 593 | * @group_dead: not 0, if this thread is the last one in the process. |