bsdacct: switch from global bsd_acct_struct instance to per-pidns one
authorPavel Emelyanov <xemul@openvz.org>
Fri, 25 Jul 2008 08:48:47 +0000 (01:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:47 +0000 (10:53 -0700)
commit0b6b030fc30d169bb406b34b4fc60d99dde4a9c6
tree2bf5160ccfe22107937ddc03a1acd4fc9b1ccaf2
parent6248b1b342005a428b1247b4e89249da1528d88d
bsdacct: switch from global bsd_acct_struct instance to per-pidns one

Allocate the structure on the first call to sys_acct().  After this each
namespace, that ordered the accounting, will live with this structure till
its own death.

Two notes
- routines, that close the accounting on fs umount time use
  the init_pid_ns's acct by now;
- accounting routine accounts to dying task's namespace
  (also by now).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/acct.h
kernel/acct.c
kernel/pid_namespace.c