mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 02:50:53 +07:00
ubifs: too early register_filesystem()
doing that before you are ready to handle mount() is a Bad Idea(tm)... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
6f686574cc
commit
5cc361e3b8
@ -2264,19 +2264,12 @@ static int __init ubifs_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = register_filesystem(&ubifs_fs_type);
|
||||
if (err) {
|
||||
ubifs_err("cannot register file system, error %d", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = -ENOMEM;
|
||||
ubifs_inode_slab = kmem_cache_create("ubifs_inode_slab",
|
||||
sizeof(struct ubifs_inode), 0,
|
||||
SLAB_MEM_SPREAD | SLAB_RECLAIM_ACCOUNT,
|
||||
&inode_slab_ctor);
|
||||
if (!ubifs_inode_slab)
|
||||
goto out_reg;
|
||||
return -ENOMEM;
|
||||
|
||||
register_shrinker(&ubifs_shrinker_info);
|
||||
|
||||
@ -2288,15 +2281,20 @@ static int __init ubifs_init(void)
|
||||
if (err)
|
||||
goto out_compr;
|
||||
|
||||
err = register_filesystem(&ubifs_fs_type);
|
||||
if (err) {
|
||||
ubifs_err("cannot register file system, error %d", err);
|
||||
goto out_dbg;
|
||||
}
|
||||
return 0;
|
||||
|
||||
out_dbg:
|
||||
dbg_debugfs_exit();
|
||||
out_compr:
|
||||
ubifs_compressors_exit();
|
||||
out_shrinker:
|
||||
unregister_shrinker(&ubifs_shrinker_info);
|
||||
kmem_cache_destroy(ubifs_inode_slab);
|
||||
out_reg:
|
||||
unregister_filesystem(&ubifs_fs_type);
|
||||
return err;
|
||||
}
|
||||
/* late_initcall to let compressors initialize first */
|
||||
|
Loading…
Reference in New Issue
Block a user