]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: iscsi: Add iscsi_cls_conn refcount helpers
authorMike Christie <michael.christie@oracle.com>
Tue, 25 May 2021 18:18:03 +0000 (13:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:07 +0000 (16:02 +0200)
commit69139793ea54eb2b62592cb7776613b6eab7c322
treee5a75c4c348c4490ae5e3b42101493665e153490
parent966acb4a571eba049bdf6b008a7bb6eef9970f35
scsi: iscsi: Add iscsi_cls_conn refcount helpers

[ Upstream commit b1d19e8c92cfb0ded180ef3376c20e130414e067 ]

There are a couple places where we could free the iscsi_cls_conn while it's
still in use. This adds some helpers to get/put a refcount on the struct
and converts an exiting user. Subsequent commits will then use the helpers
to fix 2 bugs in the eh code.

Link: https://lore.kernel.org/r/20210525181821.7617-11-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/libiscsi.c
drivers/scsi/scsi_transport_iscsi.c
include/scsi/scsi_transport_iscsi.h