diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2014-08-08 17:22:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:23 -0400 |
commit | 33144e8429bd7fceacbb869a7f5061db42e13fe6 (patch) | |
tree | 7f77c99bfe7532a7c9dd44e0de3a380e4d97d501 | |
parent | 4f7d461433bb4a4deee61baefdac6cd1a1ecb546 (diff) |
kernel/fork.c: make mm_init_owner static
It's only used in fork.c:mm_init().
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/sched.h | 5 | ||||
-rw-r--r-- | kernel/fork.c | 14 |
2 files changed, 7 insertions, 12 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4fcf82a4d243..b21e9218c0fd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2961,15 +2961,10 @@ static inline void inc_syscw(struct task_struct *tsk) | |||
2961 | 2961 | ||
2962 | #ifdef CONFIG_MEMCG | 2962 | #ifdef CONFIG_MEMCG |
2963 | extern void mm_update_next_owner(struct mm_struct *mm); | 2963 | extern void mm_update_next_owner(struct mm_struct *mm); |
2964 | extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p); | ||
2965 | #else | 2964 | #else |
2966 | static inline void mm_update_next_owner(struct mm_struct *mm) | 2965 | static inline void mm_update_next_owner(struct mm_struct *mm) |
2967 | { | 2966 | { |
2968 | } | 2967 | } |
2969 | |||
2970 | static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p) | ||
2971 | { | ||
2972 | } | ||
2973 | #endif /* CONFIG_MEMCG */ | 2968 | #endif /* CONFIG_MEMCG */ |
2974 | 2969 | ||
2975 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | 2970 | static inline unsigned long task_rlimit(const struct task_struct *tsk, |
diff --git a/kernel/fork.c b/kernel/fork.c index aff84f84b0d3..86da59e165ad 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -535,6 +535,13 @@ static void mm_init_aio(struct mm_struct *mm) | |||
535 | #endif | 535 | #endif |
536 | } | 536 | } |
537 | 537 | ||
538 | static void mm_init_owner(struct mm_struct *mm, struct task_struct *p) | ||
539 | { | ||
540 | #ifdef CONFIG_MEMCG | ||
541 | mm->owner = p; | ||
542 | #endif | ||
543 | } | ||
544 | |||
538 | static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) | 545 | static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) |
539 | { | 546 | { |
540 | mm->mmap = NULL; | 547 | mm->mmap = NULL; |
@@ -1139,13 +1146,6 @@ static void rt_mutex_init_task(struct task_struct *p) | |||
1139 | #endif | 1146 | #endif |
1140 | } | 1147 | } |
1141 | 1148 | ||
1142 | #ifdef CONFIG_MEMCG | ||
1143 | void mm_init_owner(struct mm_struct *mm, struct task_struct *p) | ||
1144 | { | ||
1145 | mm->owner = p; | ||
1146 | } | ||
1147 | #endif /* CONFIG_MEMCG */ | ||
1148 | |||
1149 | /* | 1149 | /* |
1150 | * Initialize POSIX timer handling for a single task. | 1150 | * Initialize POSIX timer handling for a single task. |
1151 | */ | 1151 | */ |