Commit 22e370f9 authored by Linus Torvalds's avatar Linus Torvalds

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.
parent 99e5aa34
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment