diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-03-19 12:04:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 17:16:50 -0400 |
commit | 701085b219016d38f105b031381b9cee6200253a (patch) | |
tree | 5111f137c507c8537d5d2c8e4203f0e6e4942bcb /fs/exec.c | |
parent | b6e238dceed36891cc633167afe7151f1f3d83c5 (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.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 | ||