diff options
author | Alex Elder <elder@inktank.com> | 2013-04-28 23:32:34 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:20:02 -0700 |
commit | 79ab7558aac7622109e9d9b089cac2c5f06aca20 (patch) | |
tree | 1956dd2f7784a34e9ae9b183979129b25c4ba0e0 /drivers/block | |
parent | b644de2ba0c5b590db9195c03358ccd0f061daa6 (diff) |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index ac94aa4b4d22..59048191ab17 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4986,9 +4986,6 @@ static void rbd_dev_release(struct device *dev) rbd_spec_put(rbd_dev->parent_spec); kfree(rbd_dev->header_name); rbd_dev_destroy(rbd_dev); - - /* release module ref */ - module_put(THIS_MODULE); } 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_bus_del_dev(rbd_dev); + module_put(THIS_MODULE); done: mutex_unlock(&ctl_mutex); |