scsi: sd: Unlock zone in case of error in sd_setup_write_same_cmnd()
authorDamien Le Moal <damien.lemoal@wdc.com>
Mon, 8 May 2017 05:59:02 +0000 (14:59 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 12 May 2017 03:10:03 +0000 (23:10 -0400)
commit29f6ca6916e29fc46f1418885374d9ed50430687
treef34bd7a4d104c5bc646dd9d6a250db6dc15c033b
parentb77b36cb7272ec5b9fb000e2ff18e947d9586a22
scsi: sd: Unlock zone in case of error in sd_setup_write_same_cmnd()

scsi_io_init() may fail, leaving a zone of a zoned block device locked.
Fix this by properly unlocking the write same request target zone if
scsi_io_init() fails.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c