diff options
author | Alex Elder <elder@inktank.com> | 2013-04-26 15:44:36 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:19:53 -0700 |
commit | b480815a17bc6bfe85d4931c53e5a8fded7f889e (patch) | |
tree | c7eb660756db8554fc95bf97fe55aaf155d9b3a2 /drivers/block | |
parent | d1cf5788450e1781f63a0626a854fe8309b32cb1 (diff) |
rbd: kill __rbd_remove()
The function __rbd_remove() is used in two spots, and it's fairly
simple. It combines cleanup of part of the ceph-side state as well
as cleaning up the Linux-side state. Just open code it in the two
callers and eliminate the function.
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 | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 98e0b8c3def8..0bae4e74555d 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4992,12 +4992,6 @@ static void rbd_dev_release(struct device *dev) 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) { @@ -5013,7 +5007,8 @@ static void rbd_dev_remove_parent(struct rbd_device *rbd_dev) 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; @@ -5058,8 +5053,8 @@ static ssize_t rbd_remove(struct bus_type *bus, 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); |