On 10/5/20 10:41 AM, Christoph Hellwig wrote:
Rename scsi_init_io to scsi_alloc_sgtables, and ensure callers call scsi_free_sgtables to cleanup failures close to scsi_init_io instead of leaking it down the generic I/O submission path. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- drivers/scsi/scsi_lib.c | 22 ++++++++-------------- drivers/scsi/sd.c | 27 +++++++++++++++------------ drivers/scsi/sr.c | 16 ++++++---------- include/scsi/scsi_cmnd.h | 3 ++- 4 files changed, 31 insertions(+), 37 deletions(-) Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer