Commit a4376e13 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

[PATCH] freevxfs: fix leak on error path

If register_filesystem() fails, vxfs_inode cache must be destroyed.
Signed-off-by: default avatarAlexey Dobriyan <>
Acked-by: default avatarChristoph Hellwig <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 50d44ed0
......@@ -260,12 +260,17 @@ static struct file_system_type vxfs_fs_type = {
static int __init
int rv;
vxfs_inode_cachep = kmem_cache_create("vxfs_inode",
sizeof(struct vxfs_inode_info), 0,
if (vxfs_inode_cachep)
return register_filesystem(&vxfs_fs_type);
return -ENOMEM;
if (!vxfs_inode_cachep)
return -ENOMEM;
rv = register_filesystem(&vxfs_fs_type);
if (rv < 0)
return rv;
static void __exit
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