Skip to content

Commit

Permalink
Btrfs: fix error return code in btrfs_init_test_fs()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Chris Mason committed Jun 23, 2016
1 parent c6887cd commit 04e1b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/tests/btrfs-tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 04e1b65

Please sign in to comment.