Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117503
b: refs/heads/master
c: 83ff6fe
h: refs/heads/master
i:
  117501: 91d7729
  117499: 7003ced
  117495: 7b23ede
  117487: 7d588b0
  117471: ce28746
  117439: da77bb2
  117375: 304e242
  117247: 296cd3e
v: v3
  • Loading branch information
Al Viro committed Oct 21, 2008
1 parent ac473b8 commit 5c62248
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 633a08b81206122469365b4c72eaeb71f04f2cb4
refs/heads/master: 83ff6fe8580a7c834dba4389d742332fff9b9929
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,14 @@ EXPORT_SYMBOL(scsi_ioctl);
* @filp: either NULL or a &struct file which must have the O_NONBLOCK flag.
*/
int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
void __user *arg, struct file *filp)
void __user *arg, int ndelay)
{
int val, result;

/* The first set of iocts may be executed even if we're doing
* error processing, as long as the device was opened
* non-blocking */
if (filp && (filp->f_flags & O_NONBLOCK)) {
if (ndelay) {
if (scsi_host_in_recovery(sdev->host))
return -ENODEV;
} else if (!scsi_block_when_processing_errors(sdev))
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,8 @@ static int sd_ioctl(struct inode * inode, struct file * filp,
* 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;

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,8 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd,
* case fall through to scsi_ioctl, which will return ENDOEV again
* if it doesn't recognise the ioctl
*/
ret = scsi_nonblockable_ioctl(sdev, cmd, argp, NULL);
ret = scsi_nonblockable_ioctl(sdev, cmd, argp,
file ? file->f_flags & O_NDELAY : 0);
if (ret != -ENODEV)
return ret;
return scsi_ioctl(sdev, cmd, argp);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -3263,7 +3263,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
* may try and take the device offline, in which case all further
* access to the device is prohibited.
*/
retval = scsi_nonblockable_ioctl(STp->device, cmd_in, p, file);
retval = scsi_nonblockable_ioctl(STp->device, cmd_in, p,
file->f_flags & O_NDELAY);
if (!scsi_block_when_processing_errors(STp->device) || retval != -ENODEV)
goto out;
retval = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/scsi/scsi_ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef struct scsi_fctargaddress {

extern int scsi_ioctl(struct scsi_device *, int, void __user *);
extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
void __user *arg, struct file *filp);
void __user *arg, int ndelay);

#endif /* __KERNEL__ */
#endif /* _SCSI_IOCTL_H */

0 comments on commit 5c62248

Please sign in to comment.