diff options
-rw-r--r-- | kernel/acct.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 7fc9f9dd1e9e..0feba97e114e 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -631,15 +631,9 @@ void acct_collect(long exitcode, int group_dead) | |||
631 | spin_unlock_irq(¤t->sighand->siglock); | 631 | spin_unlock_irq(¤t->sighand->siglock); |
632 | } | 632 | } |
633 | 633 | ||
634 | /** | 634 | static void acct_process_in_ns(struct pid_namespace *ns) |
635 | * acct_process - now just a wrapper around do_acct_process | ||
636 | * | ||
637 | * handles process accounting for an exiting task | ||
638 | */ | ||
639 | void acct_process(void) | ||
640 | { | 635 | { |
641 | struct file *file = NULL; | 636 | struct file *file = NULL; |
642 | struct pid_namespace *ns = task_active_pid_ns(current); | ||
643 | struct bsd_acct_struct *acct; | 637 | struct bsd_acct_struct *acct; |
644 | 638 | ||
645 | acct = ns->bacct; | 639 | acct = ns->bacct; |
@@ -661,3 +655,16 @@ void acct_process(void) | |||
661 | do_acct_process(acct, ns, file); | 655 | do_acct_process(acct, ns, file); |
662 | fput(file); | 656 | fput(file); |
663 | } | 657 | } |
658 | |||
659 | /** | ||
660 | * acct_process - now just a wrapper around do_acct_process | ||
661 | * | ||
662 | * handles process accounting for an exiting task | ||
663 | */ | ||
664 | void acct_process(void) | ||
665 | { | ||
666 | struct pid_namespace *ns; | ||
667 | |||
668 | for (ns = task_active_pid_ns(current); ns != NULL; ns = ns->parent) | ||
669 | acct_process_in_ns(ns); | ||
670 | } | ||