[PATCH] don't mess with file in scsi_nonblockable_ioctl()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 5d74413..5a18528 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -761,7 +761,8 @@
 	 * may try and take the device offline, in which case all further
 	 * access to the device is prohibited.
 	 */
-	error = scsi_nonblockable_ioctl(sdp, cmd, p, filp);
+	error = scsi_nonblockable_ioctl(sdp, cmd, p,
+					filp ? filp->f_flags & O_NDELAY : 0);
 	if (!scsi_block_when_processing_errors(sdp) || !error)
 		return error;