Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9fcc2d15b14894aa53e5e8b7fd5d6e3ca558e5df
Commit:     9fcc2d15b14894aa53e5e8b7fd5d6e3ca558e5df
Parent:     c0f2a9d75aed1a4be40c3975b94fd39066bd11bb
Author:     Eric W. Biederman <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 17:00:07 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 18:45:42 2007 -0800

    proc: simplify and correct proc_flush_task
    
    Currently we special case when we have only the initial pid namespace.
    Unfortunately in doing so the copied case for the other namespaces was
    broken so we don't properly flush the thread directories :(
    
    So this patch removes the unnecessary special case (removing a usage of
    proc_mnt) and corrects the flushing of the thread directories.
    
    Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
    Cc: Pavel Emelyanov <[EMAIL PROTECTED]>
    Cc: Sukadev Bhattiprolu <[EMAIL PROTECTED]>
    Cc: Kirill Korotaev <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/proc/base.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index aeaf0d0..a17c268 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2328,21 +2328,18 @@ out:
 
 void proc_flush_task(struct task_struct *task)
 {
-       int i, leader;
-       struct pid *pid, *tgid;
+       int i;
+       struct pid *pid, *tgid = NULL;
        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;
+       if (thread_group_leader(task))
+               tgid = task_tgid(task);
 
-       tgid = task_tgid(task);
-       for (i = 1; i <= pid->level; i++) {
+       for (i = 0; i <= pid->level; i++) {
                upid = &pid->numbers[i];
                proc_flush_task_mnt(upid->ns->proc_mnt, upid->nr,
-                               leader ? 0 : tgid->numbers[i].nr);
+                       tgid ? tgid->numbers[i].nr : 0);
        }
 
        upid = &pid->numbers[pid->level];
-
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