rbd: refactor rbd_init() a bit
Refactor rbd_init() a bit to make it more clear what's going on. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
90da258b88
commit
e1b4d96dea
|
@ -5292,18 +5292,22 @@ static int __init rbd_init(void)
|
||||||
|
|
||||||
if (!libceph_compatible(NULL)) {
|
if (!libceph_compatible(NULL)) {
|
||||||
rbd_warn(NULL, "libceph incompatibility (quitting)");
|
rbd_warn(NULL, "libceph incompatibility (quitting)");
|
||||||
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = rbd_slab_init();
|
rc = rbd_slab_init();
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
rc = rbd_sysfs_init();
|
rc = rbd_sysfs_init();
|
||||||
if (rc)
|
if (rc)
|
||||||
rbd_slab_exit();
|
goto err_out_slab;
|
||||||
else
|
|
||||||
pr_info("loaded\n");
|
|
||||||
|
|
||||||
|
pr_info("loaded\n");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_out_slab:
|
||||||
|
rbd_slab_exit();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue