Message ID | 1466184040-10721-1-git-send-email-weiyj_lk@163.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Fri, Jun 17, 2016 at 05:20:40PM +0000, weiyj_lk@163.com wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > 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>
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index 10eb249..02223f3 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -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; }