Re: [PATCH] driver-core: devtmpfs - driver core maintained /devtmpfs

From: Hugh Dickins
Date: Fri May 01 2009 - 07:52:37 EST


On Thu, 30 Apr 2009, Kay Sievers wrote:
...
> --- a/init/main.c
> +++ b/init/main.c
> @@ -64,6 +64,7 @@
> #include <linux/idr.h>
> #include <linux/ftrace.h>
> #include <linux/async.h>
> +#include <linux/shmem_fs.h>
> #include <trace/boot.h>
>
> #include <asm/io.h>
> @@ -778,6 +779,7 @@ static void __init do_basic_setup(void)
> init_workqueues();
> cpuset_init_smp();
> usermodehelper_init();
> + init_tmpfs();
> driver_init();
> init_irq_proc();
> do_initcalls();
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -2519,7 +2519,7 @@ static struct file_system_type tmpfs_fs_
> .kill_sb = kill_litter_super,
> };
>
> -static int __init init_tmpfs(void)
> +int __init init_tmpfs(void)
> {
> int error;
>
> @@ -2687,5 +2687,3 @@ int shmem_zero_setup(struct vm_area_stru
> vma->vm_ops = &shmem_vm_ops;
> return 0;
> }
> -
> -module_init(init_tmpfs)

I've no opinion on the big picture of your devtmpfs proposal.
But note that there's a second, !CONFIG_SHMEM, version of init_tmpfs()
also in mm/shmem.c - you'll want to take the "static " off that too,
for the tiny embedded case when ramfs is used to serve up tmpfs.

Hugh
--
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/