Skip to content

Commit ff252c1

Browse files
daeseokyountorvalds
authored andcommitted
kernel/fork.c: make dup_mm() static
dup_mm() is used only in kernel/fork.c Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent abaf378 commit ff252c1

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

‎include/linux/sched.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,8 +2295,6 @@ extern struct mm_struct *get_task_mm(struct task_struct *task);
22952295
extern struct mm_struct *mm_access(struct task_struct *task, unsigned int mode);
22962296
/* Remove the current tasks stale references to the old mm_struct */
22972297
extern void mm_release(struct task_struct *, struct mm_struct *);
2298-
/* Allocate a new mm structure and copy contents from tsk->mm */
2299-
extern struct mm_struct *dup_mm(struct task_struct *tsk);
23002298

23012299
extern int copy_thread(unsigned long, unsigned long, unsigned long,
23022300
struct task_struct *);

‎kernel/fork.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
800800
* Allocate a new mm structure and copy contents from the
801801
* mm structure of the passed in task structure.
802802
*/
803-
struct mm_struct *dup_mm(struct task_struct *tsk)
803+
static struct mm_struct *dup_mm(struct task_struct *tsk)
804804
{
805805
struct mm_struct *mm, *oldmm = current->mm;
806806
int err;

0 commit comments

Comments
 (0)