aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-19 12:04:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-20 17:16:50 -0400
commit701085b219016d38f105b031381b9cee6200253a (patch)
tree5111f137c507c8537d5d2c8e4203f0e6e4942bcb /fs/exec.c
parentb6e238dceed36891cc633167afe7151f1f3d83c5 (diff)
exec: move de_thread()->setmax_mm_hiwater_rss() into exec_mmap()
Minor cleanup. de_thread()->setmax_mm_hiwater_rss() looks a bit strange, move it into exec_mmap() which plays with old_mm. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 1e94d2263ae0..95551c6da090 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -850,6 +850,7 @@ static int exec_mmap(struct mm_struct *mm)
850 if (old_mm) { 850 if (old_mm) {
851 up_read(&old_mm->mmap_sem); 851 up_read(&old_mm->mmap_sem);
852 BUG_ON(active_mm != old_mm); 852 BUG_ON(active_mm != old_mm);
853 setmax_mm_hiwater_rss(&tsk->signal->maxrss, old_mm);
853 mm_update_next_owner(old_mm); 854 mm_update_next_owner(old_mm);
854 mmput(old_mm); 855 mmput(old_mm);
855 return 0; 856 return 0;
@@ -980,9 +981,6 @@ no_thread_group:
980 /* we have changed execution domain */ 981 /* we have changed execution domain */
981 tsk->exit_signal = SIGCHLD; 982 tsk->exit_signal = SIGCHLD;
982 983
983 if (current->mm)
984 setmax_mm_hiwater_rss(&sig->maxrss, current->mm);
985
986 exit_itimers(sig); 984 exit_itimers(sig);
987 flush_itimer_signals(); 985 flush_itimer_signals();
988 986