diff options
-rw-r--r-- | 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 50e149e08d96..5e0c6a1ce8b3 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2259,8 +2259,22 @@ out: | |||
2259 | 2259 | ||
2260 | void proc_flush_task(struct task_struct *task) | 2260 | void proc_flush_task(struct task_struct *task) |
2261 | { | 2261 | { |
2262 | proc_flush_task_mnt(proc_mnt, task->pid, | 2262 | int i, leader; |
2263 | thread_group_leader(task) ? 0 : task->tgid); | 2263 | struct pid *pid, *tgid; |
2264 | struct upid *upid; | ||
2265 | |||
2266 | leader = thread_group_leader(task); | ||
2267 | proc_flush_task_mnt(proc_mnt, task->pid, leader ? task->tgid : 0); | ||
2268 | pid = task_pid(task); | ||
2269 | if (pid->level == 0) | ||
2270 | return; | ||
2271 | |||
2272 | tgid = task_tgid(task); | ||
2273 | for (i = 1; i <= pid->level; i++) { | ||
2274 | upid = &pid->numbers[i]; | ||
2275 | proc_flush_task_mnt(upid->ns->proc_mnt, upid->nr, | ||
2276 | leader ? 0 : tgid->numbers[i].nr); | ||
2277 | } | ||
2264 | } | 2278 | } |
2265 | 2279 | ||
2266 | static struct dentry *proc_pid_instantiate(struct inode *dir, | 2280 | static struct dentry *proc_pid_instantiate(struct inode *dir, |