module_put(THIS_MODULE);
}
-static void __rbd_remove(struct rbd_device *rbd_dev)
-{
- rbd_remove_all_snaps(rbd_dev);
- rbd_bus_del_dev(rbd_dev);
-}
-
static void rbd_dev_remove_parent(struct rbd_device *rbd_dev)
{
while (rbd_dev->parent_spec) {
first = second;
second = third;
}
- __rbd_remove(second);
+ rbd_remove_all_snaps(second);
+ rbd_bus_del_dev(second);
rbd_spec_put(first->parent_spec);
first->parent_spec = NULL;
first->parent_overlap = 0;
rbd_dev_remove_parent(rbd_dev);
- __rbd_remove(rbd_dev);
-
+ rbd_remove_all_snaps(rbd_dev);
+ rbd_bus_del_dev(rbd_dev);
done:
mutex_unlock(&ctl_mutex);