summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-12-13 12:25:27 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-12-13 12:35:14 -0500
commit988f032567eaba3c5896c5de05270b9ff71b2a9d (patch)
treea16354eaba93f15682efb6b02a8a4f770edb1e1f /fs/fuse
parent5cc361e3b8241989d8240014dbbe6214c9292541 (diff)
downloadlinux-3.10-988f032567eaba3c5896c5de05270b9ff71b2a9d.tar.gz
linux-3.10-988f032567eaba3c5896c5de05270b9ff71b2a9d.tar.bz2
linux-3.10-988f032567eaba3c5896c5de05270b9ff71b2a9d.zip
fuse: register_filesystem() called too early
same story as with ubifs Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/inode.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 3e6d7275647..aa83109b943 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1138,28 +1138,28 @@ static int __init fuse_fs_init(void)
{
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",
sizeof(struct fuse_inode),
0, SLAB_HWCACHE_ALIGN,
fuse_inode_init_once);
err = -ENOMEM;
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;
- out_unreg2:
+ out3:
unregister_fuseblk();
- out_unreg:
- unregister_filesystem(&fuse_fs_type);
+ out2:
+ kmem_cache_destroy(fuse_inode_cachep);
out:
return err;
}