Commit 04e1b65a authored by Wei Yongjun's avatar Wei Yongjun Committed by Chris Mason

Btrfs: fix error return code in btrfs_init_test_fs()

Fix to return a negative error code from the kern_mount() error handling
case instead of 0(ret is set to 0 by register_filesystem), as done
elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent c6887cd1
...@@ -68,7 +68,7 @@ int btrfs_init_test_fs(void) ...@@ -68,7 +68,7 @@ int btrfs_init_test_fs(void)
if (IS_ERR(test_mnt)) { if (IS_ERR(test_mnt)) {
printk(KERN_ERR "btrfs: cannot mount test file system\n"); printk(KERN_ERR "btrfs: cannot mount test file system\n");
unregister_filesystem(&test_type); unregister_filesystem(&test_type);
return ret; return PTR_ERR(test_mnt);
} }
return 0; return 0;
} }
......
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