提交 7d8dc534 编写于 作者: C Chengguang Xu 提交者: Ilya Dryomov

rbd: add __init/__exit annotations

Add __init/__exit annotation to init/cleanup helpers
which are only called once in the module.
Signed-off-by: NChengguang Xu <cgxu519@gmx.com>
Reviewed-by: NIlya Dryomov <idryomov@gmail.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 3167893a
...@@ -6067,7 +6067,7 @@ static ssize_t rbd_remove_single_major(struct bus_type *bus, ...@@ -6067,7 +6067,7 @@ static ssize_t rbd_remove_single_major(struct bus_type *bus,
* create control files in sysfs * create control files in sysfs
* /sys/bus/rbd/... * /sys/bus/rbd/...
*/ */
static int rbd_sysfs_init(void) static int __init rbd_sysfs_init(void)
{ {
int ret; int ret;
...@@ -6082,13 +6082,13 @@ static int rbd_sysfs_init(void) ...@@ -6082,13 +6082,13 @@ static int rbd_sysfs_init(void)
return ret; return ret;
} }
static void rbd_sysfs_cleanup(void) static void __exit rbd_sysfs_cleanup(void)
{ {
bus_unregister(&rbd_bus_type); bus_unregister(&rbd_bus_type);
device_unregister(&rbd_root_dev); device_unregister(&rbd_root_dev);
} }
static int rbd_slab_init(void) static int __init rbd_slab_init(void)
{ {
rbd_assert(!rbd_img_request_cache); rbd_assert(!rbd_img_request_cache);
rbd_img_request_cache = KMEM_CACHE(rbd_img_request, 0); rbd_img_request_cache = KMEM_CACHE(rbd_img_request, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册