Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=130f77ecb2e7d5ac3e53e620f55e374f4a406b20
Commit:     130f77ecb2e7d5ac3e53e620f55e374f4a406b20
Parent:     30e49c263e36341b60b735cbef5ca37912549264
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 23:40:11 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 11:53:39 2007 -0700

    pid namespaces: make proc_flush_task() actually from entries from multiple 
namespaces
    
    This means that proc_flush_task_mnt() is to be called for many proc mounts 
and
    with different ids, depending on the namespace this pid is to be flushed 
from.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Sukadev Bhattiprolu <[EMAIL PROTECTED]>
    Cc: Paul Menage <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/proc/base.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 50e149e..5e0c6a1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2259,8 +2259,22 @@ out:
 
 void proc_flush_task(struct task_struct *task)
 {
-       proc_flush_task_mnt(proc_mnt, task->pid,
-                       thread_group_leader(task) ? 0 : task->tgid);
+       int i, leader;
+       struct pid *pid, *tgid;
+       struct upid *upid;
+
+       leader = thread_group_leader(task);
+       proc_flush_task_mnt(proc_mnt, task->pid, leader ? task->tgid : 0);
+       pid = task_pid(task);
+       if (pid->level == 0)
+               return;
+
+       tgid = task_tgid(task);
+       for (i = 1; i <= pid->level; i++) {
+               upid = &pid->numbers[i];
+               proc_flush_task_mnt(upid->ns->proc_mnt, upid->nr,
+                               leader ? 0 : tgid->numbers[i].nr);
+       }
 }
 
 static struct dentry *proc_pid_instantiate(struct inode *dir,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to