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>
This commit is contained in:
committed by
Martin K. Petersen
parent
2908769c35
commit
a90dfdc2de
@@ -846,7 +846,7 @@ static int sd_setup_write_same_cmnd(struct scsi_cmnd *cmd)
|
||||
BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size);
|
||||
|
||||
if (sd_is_zoned(sdkp)) {
|
||||
ret = sd_zbc_setup_write_cmnd(cmd);
|
||||
ret = sd_zbc_write_lock_zone(cmd);
|
||||
if (ret != BLKPREP_OK)
|
||||
return ret;
|
||||
}
|
||||
@@ -918,7 +918,7 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt)
|
||||
unsigned char protect;
|
||||
|
||||
if (zoned_write) {
|
||||
ret = sd_zbc_setup_write_cmnd(SCpnt);
|
||||
ret = sd_zbc_write_lock_zone(SCpnt);
|
||||
if (ret != BLKPREP_OK)
|
||||
return ret;
|
||||
}
|
||||
@@ -1145,7 +1145,7 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd *SCpnt)
|
||||
ret = BLKPREP_OK;
|
||||
out:
|
||||
if (zoned_write && ret != BLKPREP_OK)
|
||||
sd_zbc_cancel_write_cmnd(SCpnt);
|
||||
sd_zbc_write_unlock_zone(SCpnt);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user