Thread (20 messages) flat view 20 messages, 6 authors, 2021-08-23

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

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-08-19 21:33:56
Also in: linux-nvme, linux-s390, linux-scsi
Subsystem: scsi subsystem, scsi tape driver, the rest · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

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@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@kernel.org>

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help