Skip to content

Commit 34a046f

Browse files
Guoqing Jiangrleon
authored andcommitted
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: Md Haris Iqbal <haris.iqbal@ionos.com> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20221117101945.6317-9-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 6af4609 commit 34a046f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ rtrs_srv_destroy_once_sysfs_root_folders(struct rtrs_srv_path *srv_path)
203203

204204
mutex_lock(&srv->paths_mutex);
205205
if (!--srv->dev_ref) {
206-
kobject_del(srv->kobj_paths);
207206
kobject_put(srv->kobj_paths);
208207
mutex_unlock(&srv->paths_mutex);
209208
device_del(&srv->dev);

0 commit comments

Comments
 (0)