Skip to content

Commit 33144e8

Browse files
Vladimir Davydovtorvalds
authored andcommitted
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>
1 parent 4f7d461 commit 33144e8

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

‎include/linux/sched.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2961,15 +2961,10 @@ static inline void inc_syscw(struct task_struct *tsk)
29612961

29622962
#ifdef CONFIG_MEMCG
29632963
extern void mm_update_next_owner(struct mm_struct *mm);
2964-
extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p);
29652964
#else
29662965
static inline void mm_update_next_owner(struct mm_struct *mm)
29672966
{
29682967
}
2969-
2970-
static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
2971-
{
2972-
}
29732968
#endif /* CONFIG_MEMCG */
29742969

29752970
static inline unsigned long task_rlimit(const struct task_struct *tsk,

‎kernel/fork.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,13 @@ static void mm_init_aio(struct mm_struct *mm)
535535
#endif
536536
}
537537

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+
538545
static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p)
539546
{
540547
mm->mmap = NULL;
@@ -1139,13 +1146,6 @@ static void rt_mutex_init_task(struct task_struct *p)
11391146
#endif
11401147
}
11411148

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-
11491149
/*
11501150
* Initialize POSIX timer handling for a single task.
11511151
*/

0 commit comments

Comments
 (0)