summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd_zbc.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2017-04-24 09:51:13 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-04-25 19:00:57 +0200
commita90dfdc2dea1ce8ab87e3949c3c6bab3c1e36137 (patch)
tree364ea93fcfeb41218275c64297427d398488ea02 /drivers/scsi/sd_zbc.c
parentscsi: Improve scsi_get_sense_info_fld (diff)
downloadlinux-a90dfdc2dea1ce8ab87e3949c3c6bab3c1e36137.tar.xz
linux-a90dfdc2dea1ce8ab87e3949c3c6bab3c1e36137.zip
scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd
Rename sd_zbc_setup_write_cmnd() to sd_zbc_write_lock_zone() to be clear about what the function actually does. To be consistent, also rename sd_zbc_cancel_write_cmnd() to sd_zbc_write_unlock_zone(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd_zbc.c')
-rw-r--r--drivers/scsi/sd_zbc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 92620c8ea8ad..a7926825b120 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -269,7 +269,7 @@ int sd_zbc_setup_reset_cmnd(struct scsi_cmnd *cmd)
return BLKPREP_OK;
}
-int sd_zbc_setup_write_cmnd(struct scsi_cmnd *cmd)
+int sd_zbc_write_lock_zone(struct scsi_cmnd *cmd)
{
struct request *rq = cmd->request;
struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
@@ -303,8 +303,9 @@ int sd_zbc_setup_write_cmnd(struct scsi_cmnd *cmd)
return BLKPREP_OK;
}
-static void sd_zbc_unlock_zone(struct request *rq)
+void sd_zbc_write_unlock_zone(struct scsi_cmnd *cmd)
{
+ struct request *rq = cmd->request;
struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
if (sdkp->zones_wlock) {
@@ -315,11 +316,6 @@ static void sd_zbc_unlock_zone(struct request *rq)
}
}
-void sd_zbc_cancel_write_cmnd(struct scsi_cmnd *cmd)
-{
- sd_zbc_unlock_zone(cmd->request);
-}
-
void sd_zbc_complete(struct scsi_cmnd *cmd,
unsigned int good_bytes,
struct scsi_sense_hdr *sshdr)
@@ -333,7 +329,7 @@ void sd_zbc_complete(struct scsi_cmnd *cmd,
case REQ_OP_ZONE_RESET:
/* Unlock the zone */
- sd_zbc_unlock_zone(rq);
+ sd_zbc_write_unlock_zone(cmd);
if (!result ||
sshdr->sense_key != ILLEGAL_REQUEST)