From 22e370f9bd7fb2cb49bcf744ee4a2fe7b0a4311a Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 31 Aug 2003 22:24:11 -0700 Subject: [PATCH] Don't claim exclusive ownership of the device when doing the SG_IO and SCSI_IOCTL_SEND_COMMAND ioctl's. That just screws things up when the drive is mounted. If somebody wants exclusive access, he should indicate that at open time. --- drivers/block/scsi_ioctl.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/block/scsi_ioctl.c b/drivers/block/scsi_ioctl.c index ea340cc89bd47..94574b14f30bd 100644 --- a/drivers/block/scsi_ioctl.c +++ b/drivers/block/scsi_ioctl.c @@ -438,11 +438,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar err = sg_emulated_host(q, (int *) arg); break; case SG_IO: - err = bd_claim(bdev, current); - if (err) - break; err = sg_io(q, bdev, (struct sg_io_hdr *) arg); - bd_release(bdev); break; /* * old junk scsi send command ioctl @@ -452,11 +448,7 @@ int scsi_cmd_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long ar if (!arg) break; - err = bd_claim(bdev, current); - if (err) - break; err = sg_scsi_ioctl(q, bdev, (Scsi_Ioctl_Command *)arg); - bd_release(bdev); break; case CDROMCLOSETRAY: close = 1; -- 2.53.0