Commit 988f0325 authored by Al Viro's avatar Al Viro

fuse: register_filesystem() called too early

same story as with ubifs
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5cc361e3
...@@ -1138,28 +1138,28 @@ static int __init fuse_fs_init(void) ...@@ -1138,28 +1138,28 @@ static int __init fuse_fs_init(void)
{ {
int err; int err;
err = register_filesystem(&fuse_fs_type);
if (err)
goto out;
err = register_fuseblk();
if (err)
goto out_unreg;
fuse_inode_cachep = kmem_cache_create("fuse_inode", fuse_inode_cachep = kmem_cache_create("fuse_inode",
sizeof(struct fuse_inode), sizeof(struct fuse_inode),
0, SLAB_HWCACHE_ALIGN, 0, SLAB_HWCACHE_ALIGN,
fuse_inode_init_once); fuse_inode_init_once);
err = -ENOMEM; err = -ENOMEM;
if (!fuse_inode_cachep) if (!fuse_inode_cachep)
goto out_unreg2; goto out;
err = register_fuseblk();
if (err)
goto out2;
err = register_filesystem(&fuse_fs_type);
if (err)
goto out3;
return 0; return 0;
out_unreg2: out3:
unregister_fuseblk(); unregister_fuseblk();
out_unreg: out2:
unregister_filesystem(&fuse_fs_type); kmem_cache_destroy(fuse_inode_cachep);
out: out:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment