lkml.org 
[lkml]   [2012]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 3/3] 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>
---
fs/exec.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 218d074..7f84e86 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -848,6 +848,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;
@@ -978,9 +979,6 @@ no_thread_group:
/* 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();

--
1.5.5.1



\
 
 \ /
  Last update: 2012-03-19 17:15    [W:0.066 / U:11.780 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site