]> Git Repo - linux.git/commitdiff
scsi: scsi_debug: Remove superfluous close zone in resp_open_zone()
authorNiklas Cassel <[email protected]>
Fri, 21 Aug 2020 13:00:07 +0000 (15:00 +0200)
committerMartin K. Petersen <[email protected]>
Tue, 25 Aug 2020 03:02:18 +0000 (23:02 -0400)
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]>
drivers/scsi/scsi_debug.c

index 139f0073da371b94dad7180e49776a84e79601a9..1ad7260d4758f4d0d2a232f6bb2561bc3a940a9b 100644 (file)
@@ -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);
This page took 0.068581 seconds and 4 git commands to generate.