scsi: sd: Write lock zone for REQ_OP_WRITE_ZEROES
authorDamien Le Moal <damien.lemoal@wdc.com>
Mon, 8 May 2017 06:48:19 +0000 (15:48 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 12 May 2017 03:11:49 +0000 (23:11 -0400)
commited44fd7fd8a6785b73cfc6d44594c434e578d724
tree189581b28758c7b9ce23e3b6caf038f8d7478c1b
parent29f6ca6916e29fc46f1418885374d9ed50430687
scsi: sd: Write lock zone for REQ_OP_WRITE_ZEROES

For a zoned block device, sd_zbc_complete() handles zone write unlock on
completion of a REQ_OP_WRITE_ZEROES command but the zone write locking
is missing from sd_setup_write_zeroes_cmnd(). This patch fixes this
problem by locking the target zone of a REQ_OP_WRITE_ZEROES request.

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