diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-19 02:40:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:38 -0400 |
commit | 60347f6716aa49831ac311e04d77ccdc50dc024a (patch) | |
tree | 82e666fef22f43550da42ad368a61a5e9a59ef96 /include/linux | |
parent | 8bf9725c29f2589237dd696d06a204230add0ba3 (diff) |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/proc_fs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 20741f668f7b..dbd601c7244c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -207,7 +207,9 @@ extern void proc_net_remove(struct net *net, const char *name); | |||
207 | #define proc_net_create(net, name, mode, info) ({ (void)(mode), NULL; }) | 207 | #define proc_net_create(net, name, mode, info) ({ (void)(mode), NULL; }) |
208 | static inline void proc_net_remove(struct net *net, const char *name) {} | 208 | static inline void proc_net_remove(struct net *net, const char *name) {} |
209 | 209 | ||
210 | static inline void proc_flush_task(struct task_struct *task) { } | 210 | static inline void proc_flush_task(struct task_struct *task) |
211 | { | ||
212 | } | ||
211 | 213 | ||
212 | static inline struct proc_dir_entry *create_proc_entry(const char *name, | 214 | static inline struct proc_dir_entry *create_proc_entry(const char *name, |
213 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } | 215 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } |