diff options
author | Alex Elder <elder@inktank.com> | 2013-04-26 20:44:37 (GMT) |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 04:19:56 (GMT) |
commit | 5de10f3b0c99983e3f9ec19baa1eb691685d9b8f (patch) | |
tree | 92c94350812114c72d074ad18e6494fe40664401 /drivers/block | |
parent | 2e93bf9e465b7d0ccf703fb791c663435d9522cf (diff) | |
download | linux-fsl-qoriq-5de10f3b0c99983e3f9ec19baa1eb691685d9b8f.tar.xz |
rbd: probe for the parent earlier
Probe for a parent device earlier in rbd_dev_probe_finish(), before
starting to set up the Linux side of the rbd device.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index eed7029..e86238c 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4772,6 +4772,10 @@ static int rbd_dev_probe_finish(struct rbd_device *rbd_dev) if (ret) goto err_out_snaps; + ret = rbd_dev_probe_parent(rbd_dev); + if (ret) + goto err_out_mapping; + /* generate unique id: find highest unique id, add one */ rbd_dev_id_get(rbd_dev); @@ -4797,10 +4801,6 @@ static int rbd_dev_probe_finish(struct rbd_device *rbd_dev) if (ret) goto err_out_disk; - ret = rbd_dev_probe_parent(rbd_dev); - if (ret) - goto err_out_bus; - /* Everything's ready. Announce the disk to the world. */ set_capacity(rbd_dev->disk, rbd_dev->mapping.size / SECTOR_SIZE); @@ -4812,17 +4812,14 @@ static int rbd_dev_probe_finish(struct rbd_device *rbd_dev) return ret; -err_out_bus: - rbd_dev_remove_parent(rbd_dev); - rbd_bus_del_dev(rbd_dev); - - return ret; err_out_disk: rbd_free_disk(rbd_dev); err_out_blkdev: unregister_blkdev(rbd_dev->major, rbd_dev->name); err_out_id: rbd_dev_id_put(rbd_dev); + rbd_dev_remove_parent(rbd_dev); +err_out_mapping: rbd_dev_mapping_clear(rbd_dev); err_out_snaps: rbd_remove_all_snaps(rbd_dev); |