Skip to content

Commit

Permalink
exec: document acct_arg_size()
Browse files Browse the repository at this point in the history
Add the comment to explain acct_arg_size().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
  • Loading branch information
Oleg Nesterov committed Apr 9, 2011
1 parent 0e02846 commit ae6b585
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
}

#ifdef CONFIG_MMU

/*
* The nascent bprm->mm is not visible until exec_mmap() but it can
* use a lot of memory, account these pages in current->mm temporary
* for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we
* change the counter back via acct_arg_size(0).
*/
static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages)
{
struct mm_struct *mm = current->mm;
Expand Down

0 comments on commit ae6b585

Please sign in to comment.