diff options
author | David Hildenbrand <david@redhat.com> | 2021-04-23 11:20:25 +0300 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2021-09-03 19:42:01 +0300 |
commit | 35d7bdc86031a2c1ae05ac27dfa93b2acdcbaecc (patch) | |
tree | 0637f57df13ec0ff4bfe4c2aabf7a91640a42668 /include/linux/mm.h | |
parent | 42be8b42535183f84df99acbaf799e38724348f3 (diff) | |
download | linux-35d7bdc86031a2c1ae05ac27dfa93b2acdcbaecc.tar.xz |
kernel/fork: factor out replacing the current MM exe_file
Let's factor the main logic out into replace_mm_exe_file(), such that
all mm->exe_file logic is contained in kernel/fork.c.
While at it, perform some simple cleanups that are possible now that
we're simplifying the individual functions.
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7ca22e6e694a..48c6fa9ab792 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2581,6 +2581,7 @@ extern int mm_take_all_locks(struct mm_struct *mm); extern void mm_drop_all_locks(struct mm_struct *mm); extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); +extern int replace_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); extern struct file *get_mm_exe_file(struct mm_struct *mm); extern struct file *get_task_exe_file(struct task_struct *task); |