提交 e1b4d96d 编写于 作者: I Ilya Dryomov

rbd: refactor rbd_init() a bit

Refactor rbd_init() a bit to make it more clear what's going on.
Signed-off-by: NIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: NAlex Elder <elder@linaro.org>
Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
上级 90da258b
......@@ -5292,18 +5292,22 @@ static int __init rbd_init(void)
if (!libceph_compatible(NULL)) {
rbd_warn(NULL, "libceph incompatibility (quitting)");
return -EINVAL;
}
rc = rbd_slab_init();
if (rc)
return rc;
rc = rbd_sysfs_init();
if (rc)
rbd_slab_exit();
else
pr_info("loaded\n");
goto err_out_slab;
pr_info("loaded\n");
return 0;
err_out_slab:
rbd_slab_exit();
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册