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.

Reviewed-by: Brian King <brk...@linux.vnet.ibm.com>




-- 
Brian King
Power Linux I/O
IBM Linux Technology Center

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to