]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: st: ERASE does not change tape location
authorKai Mäkisara <Kai.Makisara@kolumbus.fi>
Tue, 11 Mar 2025 11:25:15 +0000 (13:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:39 +0000 (11:12 +0200)
[ Upstream commit ad77cebf97bd42c93ab4e3bffd09f2b905c1959a ]

The SCSI ERASE command erases from the current position onwards.  Don't
clear the position variables.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://lore.kernel.org/r/20250311112516.5548-3-Kai.Makisara@kolumbus.fi
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/st.c

index 2a18ba51427ac7e3feb380c93ab3c90f32c999a2..4add423f2f4157d66a47bf4b9f7db1b59ac6d13c 100644 (file)
@@ -2897,7 +2897,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
                        timeout = STp->long_timeout * 8;
 
                DEBC_printk(STp, "Erasing tape.\n");
-               fileno = blkno = at_sm = 0;
                break;
        case MTSETBLK:          /* Set block length */
        case MTSETDENSITY:      /* Set tape density */