1
0
Fork 0

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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
hifive-unleashed-5.1
Wei Yongjun 2016-06-17 17:20:40 +00:00 committed by Chris Mason
parent c6887cd111
commit 04e1b65af2
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ int btrfs_init_test_fs(void)
if (IS_ERR(test_mnt)) {
printk(KERN_ERR "btrfs: cannot mount test file system\n");
unregister_filesystem(&test_type);
return ret;
return PTR_ERR(test_mnt);
}
return 0;
}