]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libiscsi: Improve conn_send_pdu API
authorMike Christie <michael.christie@oracle.com>
Thu, 16 Jun 2022 22:45:57 +0000 (17:45 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Jun 2022 01:19:23 +0000 (21:19 -0400)
commitce1950eb176df2a8cf4a87f428239583921d9c7d
treee26b11105965a47d7dcdb3c71d8d650f20c11f14
parentbf2a3d22fd244a5e6ea0d39c7670b7b70689c1dc
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>
drivers/scsi/libiscsi.c
include/scsi/libiscsi.h