Re: [PATCH 2/7] proc: Implement support for automounts in taskdirectories

From: Alexey Dobriyan
Date: Thu Nov 06 2008 - 23:38:25 EST


On Thu, Nov 06, 2008 at 02:48:35AM -0800, Eric W. Biederman wrote:
> --- a/fs/proc/Makefile
> +++ b/fs/proc/Makefile
> @@ -18,6 +18,7 @@ proc-y += meminfo.o
> proc-y += stat.o
> proc-y += uptime.o
> proc-y += version.o
> +proc-y += automount.o
> proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o
> proc-$(CONFIG_NET) += proc_net.o
> proc-$(CONFIG_PROC_KCORE) += kcore.o

> --- a/include/linux/proc_fs.h
> +++ b/include/linux/proc_fs.h
> @@ -101,6 +101,7 @@ extern spinlock_t proc_subdir_lock;
>
> extern void proc_root_init(void);
>
> +void proc_shrink_automounts(void);
> void proc_flush_task(struct task_struct *task);
> struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
> int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
> diff --git a/kernel/exit.c b/kernel/exit.c
> index 80137a5..8a8badb 100644
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -161,6 +161,7 @@ void release_task(struct task_struct * p)
> repeat:
> tracehook_prepare_release_task(p);
> atomic_dec(&p->user->processes);
> + proc_shrink_automounts();

This, of course, won't compile when PROC_FS=n.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/