Re: [PATCH 3/9] sg: do not allocate a gendisk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 16, 2021 at 03:19:04PM +0200, Christoph Hellwig wrote:
> sg is a character driver and thus does not need to allocate a gendisk,
> which is only used for file system-like block layer I/O on block
> devices.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

You forgot to do something like this too:


diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index c7d2c1c5a299..9d04929f03a1 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3827,7 +3827,7 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
 		break;
 	}
 
-	retval = scsi_ioctl(STp->device, STp->disk, file->f_mode, cmd_in, p);
+	retval = scsi_ioctl(STp->device, NULL, file->f_mode, cmd_in, p);
 	if (!retval && cmd_in == SCSI_IOCTL_STOP_UNIT) {
 		/* unload */
 		STp->rew_at_close = 0;

Other than that:

Reviewed-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>

  Luis



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux