[PATCH 3/9] sg: do not allocate a gendisk
Luis Chamberlain
mcgrof at kernel.org
Thu Aug 19 14:33:27 PDT 2021
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 at lst.de>
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 at kernel.org>
Luis
More information about the Linux-nvme
mailing list