Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106025
b: refs/heads/master
c: 7d1e135
h: refs/heads/master
i:
  106023: 0890c71
v: v3
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Jul 25, 2008
1 parent 15d5819 commit f6ac5f3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5a7174875ea570cc675f2c503e800db8efdd6a7
refs/heads/master: 7d1e13505be8c2bd2207894f4e0f069e1f9b51c9
21 changes: 14 additions & 7 deletions trunk/kernel/acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,9 @@ void acct_collect(long exitcode, int group_dead)
spin_unlock_irq(&current->sighand->siglock);
}

/**
* acct_process - now just a wrapper around do_acct_process
*
* handles process accounting for an exiting task
*/
void acct_process(void)
static void acct_process_in_ns(struct pid_namespace *ns)
{
struct file *file = NULL;
struct pid_namespace *ns = task_active_pid_ns(current);
struct bsd_acct_struct *acct;

acct = ns->bacct;
Expand All @@ -661,3 +655,16 @@ void acct_process(void)
do_acct_process(acct, ns, file);
fput(file);
}

/**
* acct_process - now just a wrapper around do_acct_process
*
* handles process accounting for an exiting task
*/
void acct_process(void)
{
struct pid_namespace *ns;

for (ns = task_active_pid_ns(current); ns != NULL; ns = ns->parent)
acct_process_in_ns(ns);
}

0 comments on commit f6ac5f3

Please sign in to comment.