Merge HEAD from ../scsi-misc-2.6-tmp
[sfrench/cifs-2.6.git] / drivers / scsi / sg.c
index e822ca0e97cf441ca7ea407266dec3a8aee132f9..052d55c167d41d04a03dac56b3e5d75bfc064db2 100644 (file)
@@ -1027,8 +1027,7 @@ sg_ioctl(struct inode *inode, struct file *filp,
                if (sdp->detached)
                        return -ENODEV;
                if (filp->f_flags & O_NONBLOCK) {
-                       if (test_bit(SHOST_RECOVERY,
-                                    &sdp->device->host->shost_state))
+                       if (sdp->device->host->shost_state == SHOST_RECOVERY)
                                return -EBUSY;
                } else if (!scsi_block_when_processing_errors(sdp->device))
                        return -EBUSY;