summaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2022-06-17 01:45:57 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-06-22 04:19:23 +0300
commit6e637b723d8277cac4d347ea671ab798b70d8fc9 (patch)
treee26b11105965a47d7dcdb3c71d8d650f20c11f14 /include/scsi
parent6d626150d6d1c14f2f3d4f907fd0d4381f2c0d35 (diff)
downloadlinux-6e637b723d8277cac4d347ea671ab798b70d8fc9.tar.xz
scsi: libiscsi: Improve conn_send_pdu API
The conn_send_pdu API is evil in that it returns a pointer to an iscsi_task, but that task might have been freed already so you can't touch it. This patch splits the task allocation and transmission, so functions like iscsi_send_nopout() can access the task before its sent and do whatever bookkeeping is needed before it is sent. Link: https://lore.kernel.org/r/20220616224557.115234-10-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>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libiscsi.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index ec15e820f62b..654cc3918c94 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -135,9 +135,6 @@ struct iscsi_task {
void *dd_data; /* driver/transport data */
};
-/* invalid scsi_task pointer */
-#define INVALID_SCSI_TASK (struct iscsi_task *)-1l
-
static inline int iscsi_task_has_unsol_data(struct iscsi_task *task)
{
return task->unsol_r2t.data_length > task->unsol_r2t.sent;