Commit 34a046f0 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Leon Romanovsky

RDMA/rtrs-srv: Remove kobject_del from rtrs_srv_destroy_once_sysfs_root_folders

The kobj_paths which is created dynamically by kobject_create_and_add,
and per the comment above kobject_create_and_add, we only need to call
kobject_put which is not same as other kobjs such as stats->kobj_stats
and srv_path->kobj.
Acked-by: default avatarMd Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20221117101945.6317-9-guoqing.jiang@linux.devSigned-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 6af4609c
...@@ -203,7 +203,6 @@ rtrs_srv_destroy_once_sysfs_root_folders(struct rtrs_srv_path *srv_path) ...@@ -203,7 +203,6 @@ rtrs_srv_destroy_once_sysfs_root_folders(struct rtrs_srv_path *srv_path)
mutex_lock(&srv->paths_mutex); mutex_lock(&srv->paths_mutex);
if (!--srv->dev_ref) { if (!--srv->dev_ref) {
kobject_del(srv->kobj_paths);
kobject_put(srv->kobj_paths); kobject_put(srv->kobj_paths);
mutex_unlock(&srv->paths_mutex); mutex_unlock(&srv->paths_mutex);
device_del(&srv->dev); device_del(&srv->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment