Skip to content

Commit

Permalink
rbd: refactor rbd_init() a bit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilya Dryomov committed Dec 31, 2013
1 parent 90da258 commit e1b4d96
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e1b4d96

Please sign in to comment.