File tree 5 files changed +5
-13
lines changed 5 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 29
29
#include <linux/sched/task.h>
30
30
#include <uapi/linux/mount.h>
31
31
#include <linux/fs_context.h>
32
+ #include <linux/shmem_fs.h>
32
33
33
34
#include "pnode.h"
34
35
#include "internal.h"
@@ -3740,6 +3741,7 @@ void __init mnt_init(void)
3740
3741
fs_kobj = kobject_create_and_add ("fs" , NULL );
3741
3742
if (!fs_kobj )
3742
3743
printk (KERN_WARNING "%s: kobj create error\n" , __func__ );
3744
+ shmem_init ();
3743
3745
init_rootfs ();
3744
3746
init_mount_tree ();
3745
3747
}
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ extern unsigned int reset_devices;
148
148
/* used by init/main.c */
149
149
void setup_arch (char * * );
150
150
void prepare_namespace (void );
151
- int __init init_rootfs (void );
151
+ void __init init_rootfs (void );
152
152
extern struct file_system_type rootfs_fs_type ;
153
153
154
154
#if defined(CONFIG_STRICT_KERNEL_RWX ) || defined(CONFIG_STRICT_MODULE_RWX )
Original file line number Diff line number Diff line change @@ -643,14 +643,9 @@ struct file_system_type rootfs_fs_type = {
643
643
.kill_sb = kill_litter_super ,
644
644
};
645
645
646
- int __init init_rootfs (void )
646
+ void __init init_rootfs (void )
647
647
{
648
- int err = 0 ;
649
-
650
648
if (IS_ENABLED (CONFIG_TMPFS ) && !saved_root_name [0 ] &&
651
- (!root_fs_names || strstr (root_fs_names , "tmpfs" ))) {
652
- err = shmem_init ();
649
+ (!root_fs_names || strstr (root_fs_names , "tmpfs" )))
653
650
is_tmpfs = true;
654
- }
655
- return err ;
656
651
}
Original file line number Diff line number Diff line change @@ -1000,7 +1000,6 @@ static void __init do_initcalls(void)
1000
1000
static void __init do_basic_setup (void )
1001
1001
{
1002
1002
cpuset_init_smp ();
1003
- shmem_init ();
1004
1003
driver_init ();
1005
1004
init_irq_proc ();
1006
1005
do_ctors ();
Original file line number Diff line number Diff line change @@ -3775,10 +3775,6 @@ int __init shmem_init(void)
3775
3775
{
3776
3776
int error ;
3777
3777
3778
- /* If rootfs called this, don't re-init */
3779
- if (shmem_inode_cachep )
3780
- return 0 ;
3781
-
3782
3778
shmem_init_inodecache ();
3783
3779
3784
3780
error = register_filesystem (& shmem_fs_type );
You can’t perform that action at this time.
0 commit comments