summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2022-04-08 03:13:07 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-04-12 05:09:34 +0300
commit3c6ae371b8a1ffba1fc415989fd581ebf841ed0a (patch)
tree8092db4e93248fcc76d24168ed421f8da87e957d /include
parentcbd2283aaf47fef4ded4b29124b1ef3beb515f3a (diff)
downloadlinux-3c6ae371b8a1ffba1fc415989fd581ebf841ed0a.tar.xz
scsi: iscsi: Release endpoint ID when its freed
We can't release the endpoint ID until all references to the endpoint have been dropped or it could be allocated while in use. This has us use an idr instead of looping over all conns to find a free ID and then free the ID when all references have been dropped instead of when the device is only deleted. Link: https://lore.kernel.org/r/20220408001314.5014-4-michael.christie@oracle.com Tested-by: Manish Rangankar <mrangankar@marvell.com> Reviewed-by: Lee Duncan <lduncan@suse.com> Reviewed-by: Chris Leech <cleech@redhat.com> Reviewed-by: Wu Bo <wubo40@huawei.com> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_transport_iscsi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 38e4a67f5922..fdd486047404 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -295,7 +295,7 @@ extern void iscsi_host_for_each_session(struct Scsi_Host *shost,
struct iscsi_endpoint {
void *dd_data; /* LLD private data */
struct device dev;
- uint64_t id;
+ int id;
struct iscsi_cls_conn *conn;
};