android_kernel_xiaomi_sm8350/fs/proc
Pavel Emelyanov 60347f6716 pid namespaces: prepare proc_flust_task() to flush entries from multiple proc trees
The first part is trivial - we just make the proc_flush_task() to operate on
arbitrary vfsmount with arbitrary ids and pass the pid and global proc_mnt to
it.

The other change is more tricky: I moved the proc_flush_task() call in
release_task() higher to address the following problem.

When flushing task from many proc trees we need to know the set of ids (not
just one pid) to find the dentries' names to flush.  Thus we need to pass the
task's pid to proc_flush_task() as struct pid is the only object that can
provide all the pid numbers.  But after __exit_signal() task has detached all
his pids and this information is lost.

This creates a tiny gap for proc_pid_lookup() to bring some dentries back to
tree and keep them in hash (since pids are still alive before __exit_signal())
till the next shrink, but since proc_flush_task() does not provide a 100%
guarantee that the dentries will be flushed, this is OK to do so.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Paul Menage <menage@google.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>
2007-10-19 11:53:38 -07:00
..
array.c pid namespaces: round up the API 2007-10-19 11:53:37 -07:00
base.c pid namespaces: prepare proc_flust_task() to flush entries from multiple proc trees 2007-10-19 11:53:38 -07:00
generic.c Group short-lived and reclaimable kernel allocations 2007-10-16 09:43:00 -07:00
inode-alloc.txt
inode.c SLAB_PANIC more (proc, posix-timers, shmem) 2007-10-17 08:42:47 -07:00
internal.h [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
kcore.c
kmsg.c
Makefile [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
mmu.c fs/proc/mmu.c: headers butchery 2007-10-17 08:42:48 -07:00
nommu.c
proc_devtree.c
proc_misc.c pid namespaces: define and use task_active_pid_ns() wrapper 2007-10-19 11:53:37 -07:00
proc_net.c [NETNS]: Move some code into __init section when CONFIG_NET_NS=n 2007-10-10 16:54:58 -07:00
proc_sysctl.c
proc_tty.c Make /proc/tty/drivers use seq_list_xxx helpers 2007-07-16 09:05:42 -07:00
root.c [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
task_mmu.c
task_nommu.c
vmcore.c