Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1b4d96d authored by Ilya Dryomov's avatar Ilya Dryomov
Browse files

rbd: refactor rbd_init() a bit



Refactor rbd_init() a bit to make it more clear what's going on.

Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent 90da258b
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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
		goto err_out_slab;

	pr_info("loaded\n");
	return 0;

err_out_slab:
	rbd_slab_exit();
	return rc;
}