Skip to content
Commit 740411ee authored by Mike Christie's avatar Mike Christie Committed by Greg Kroah-Hartman
Browse files

scsi: iscsi: Release endpoint ID when its freed

[ Upstream commit 3c6ae371 ]

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: default avatarManish Rangankar <mrangankar@marvell.com>
Reviewed-by: default avatarLee Duncan <lduncan@suse.com>
Reviewed-by: default avatarChris Leech <cleech@redhat.com>
Reviewed-by: default avatarWu Bo <wubo40@huawei.com>
Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 123a52eb
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