diff options
| author | Niklas Cassel <[email protected]> | 2020-08-21 13:00:07 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2020-08-25 03:02:18 +0000 |
| commit | 75d46c6d15efabc5176a5e2694ee236f02ee72ef (patch) | |
| tree | 27e9c394ddbca88faa2e7db738a66149175d2036 /drivers/scsi/scsi_debug.c | |
| parent | scsi: libcxgbi: Fix a use after free in cxgbi_conn_xmit_pdu() (diff) | |
| download | kernel-75d46c6d15efabc5176a5e2694ee236f02ee72ef.tar.gz kernel-75d46c6d15efabc5176a5e2694ee236f02ee72ef.zip | |
scsi: scsi_debug: Remove superfluous close zone in resp_open_zone()
resp_open_zone() always calls zbc_open_zone() with parameter explicit set
to true.
If zbc_open_zone() is called with parameter explicit set to true, and the
current zone state is implicit open, it will call zbc_close_zone() on the
zone before proceeding.
Therefore, there is no need for resp_open_zone() to call zbc_close_zone()
on an implicitly open zone before calling zbc_open_zone().
Remove superfluous close zone in resp_open_zone().
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Damien Le Moal <[email protected]>
Signed-off-by: Niklas Cassel <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
| -rw-r--r-- | drivers/scsi/scsi_debug.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 139f0073da37..1ad7260d4758 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4482,8 +4482,6 @@ static int resp_open_zone(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) goto fini; } - if (zc == ZC2_IMPLICIT_OPEN) - zbc_close_zone(devip, zsp); zbc_open_zone(devip, zsp, true); fini: write_unlock(macc_lckp); |
