Skip to content

Commit

Permalink
exec: move de_thread()->setmax_mm_hiwater_rss() into exec_mmap()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
oleg-nesterov authored and torvalds committed Mar 20, 2012
1 parent b6e238d commit 701085b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ static int exec_mmap(struct mm_struct *mm)
if (old_mm) {
up_read(&old_mm->mmap_sem);
BUG_ON(active_mm != old_mm);
setmax_mm_hiwater_rss(&tsk->signal->maxrss, old_mm);
mm_update_next_owner(old_mm);
mmput(old_mm);
return 0;
Expand Down Expand Up @@ -980,9 +981,6 @@ static int de_thread(struct task_struct *tsk)
/* we have changed execution domain */
tsk->exit_signal = SIGCHLD;

if (current->mm)
setmax_mm_hiwater_rss(&sig->maxrss, current->mm);

exit_itimers(sig);
flush_itimer_signals();

Expand Down

0 comments on commit 701085b

Please sign in to comment.