Re: [PATCH RFC] RDMA/rtrs: Don't call kobject_del for srv_path->kobj

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/02/2023 15:25, lizhijian@xxxxxxxxxxx wrote:
> 
> 
> On 02/02/2023 12:09, Guoqing Jiang wrote:
>>>
>>
>> Suppose it also happened during run your script, I guess it might be some
>> racy conditions.
> That's true
> 
> 
>>
>> $ while true;
>> do
>>           echo "sessname=foo path=ip:<ip address> device_path=/dev/nvme0n1" > /sys/devices/virtual/rnbd-client/ctl/map_device
>>           echo "normal" > /sys/block/rnbd0/rnbd/unmap_device
>> done
>>
>>
>> Or does it disappear after revert 6af4609c18b3? If so, we can revert it
>> first.
> 
> Well, everything goes well after i reverted 6af4609c18b3.

6af4609c18b3 seems make senses, so i don't want to revert it entirely if possible.

I have a update for this path like below, i am no longer get problem with this new update.

index c76ba29da1e2..5adba0f754b6 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c
@@ -312,9 +312,8 @@ void rtrs_srv_destroy_path_files(struct rtrs_srv_path *srv_path)
  
         if (srv_path->kobj.state_in_sysfs) {
                 sysfs_remove_group(&srv_path->kobj, &rtrs_srv_path_attr_group);
-               kobject_del(&srv_path->kobj);
                 kobject_put(&srv_path->kobj);
+               rtrs_srv_destroy_once_sysfs_root_folders(srv_path);
         }
  
-       rtrs_srv_destroy_once_sysfs_root_folders(srv_path);
  }


> 
> Thanks
> Zhijian
>>
>> Thanks,
>> Guoqing




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux