> On Sep 28, 2015, at 6:41 PM, Brian King <brking@xxxxxxxxxxxxxxxxxx> wrote: > On 09/25/2015 06:19 PM, Matthew R. Ochs wrote: >> static int write_same16(struct scsi_device *sdev, >> @@ -433,9 +451,20 @@ static int write_same16(struct scsi_device *sdev, >> put_unaligned_be32(ws_limit < left ? ws_limit : left, >> &scsi_cmd[10]); >> >> + /* Drop the ioctl read semahpore across lengthy call */ >> + up_read(&cfg->ioctl_rwsem); >> result = scsi_execute(sdev, scsi_cmd, DMA_TO_DEVICE, cmd_buf, >> CMD_BUFSIZE, sense_buf, to, CMD_RETRIES, >> 0, NULL); >> + down_read(&cfg->ioctl_rwsem); >> + rc = check_state(cfg); >> + if (rc) { >> + dev_err(dev, "%s: Failed state! result=0x08%X\n", >> + __func__, result); >> + rc = -ENODEV; > > Since check_state only returns 0 or -ENODEV, this is a bit redundant, but not worth redoing the > patch in my mind. Agreed. This occurred to me the other day after submitting this patch when I was reviewing the state locking code. Will look at revising in a future patch. Thanks again for reviewing. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html