提交 79ab7558 编写于 作者: A Alex Elder 提交者: Sage Weil

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: NAlex Elder <elder@inktank.com>
Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
上级 b644de2b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册