diff options
author | Mike Christie <michael.christie@oracle.com> | 2021-05-25 13:18:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:16:08 +0200 |
commit | 8d3f5e3b4ebe1e4cdc9f6d79dd24e77aa8007efb (patch) | |
tree | 585f8b429a6b1f8e494e1a328428f26b36d120f9 /include | |
parent | 8a63ff46c2196bb9cd2a7afbfe7aa4cb3388f5b8 (diff) | |
download | linux-stable-8d3f5e3b4ebe1e4cdc9f6d79dd24e77aa8007efb.tar.gz linux-stable-8d3f5e3b4ebe1e4cdc9f6d79dd24e77aa8007efb.tar.bz2 linux-stable-8d3f5e3b4ebe1e4cdc9f6d79dd24e77aa8007efb.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index b266d2a3bcb1..484e9787d817 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h @@ -436,6 +436,8 @@ extern void iscsi_remove_session(struct iscsi_cls_session *session); extern void iscsi_free_session(struct iscsi_cls_session *session); extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess, int dd_size, uint32_t cid); +extern void iscsi_put_conn(struct iscsi_cls_conn *conn); +extern void iscsi_get_conn(struct iscsi_cls_conn *conn); extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn); extern void iscsi_unblock_session(struct iscsi_cls_session *session); extern void iscsi_block_session(struct iscsi_cls_session *session); |