rbd: drop module later

Drop the module reference at the end of rbd_remove() for symmetry
with adding a reference at the top of rbd_add().

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Alex Elder 2013-04-28 23:32:34 -05:00 committed by Sage Weil
parent b644de2ba0
commit 79ab7558aa
1 changed files with 1 additions and 3 deletions

View File

@ -4986,9 +4986,6 @@ static void rbd_dev_release(struct device *dev)
rbd_spec_put(rbd_dev->parent_spec); rbd_spec_put(rbd_dev->parent_spec);
kfree(rbd_dev->header_name); kfree(rbd_dev->header_name);
rbd_dev_destroy(rbd_dev); rbd_dev_destroy(rbd_dev);
/* release module ref */
module_put(THIS_MODULE);
} }
static void rbd_dev_remove_parent(struct rbd_device *rbd_dev) static void rbd_dev_remove_parent(struct rbd_device *rbd_dev)
@ -5071,6 +5068,7 @@ static ssize_t rbd_remove(struct bus_type *bus,
rbd_remove_all_snaps(rbd_dev); rbd_remove_all_snaps(rbd_dev);
rbd_bus_del_dev(rbd_dev); rbd_bus_del_dev(rbd_dev);
module_put(THIS_MODULE);
done: done:
mutex_unlock(&ctl_mutex); mutex_unlock(&ctl_mutex);