mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[PATCH 1/2] kill FMODE_NDELAY_NOW
Update FMODE_NDELAY before each ioctl call so that we can kill the magic FMODE_NDELAY_NOW. It would be even better to do this directly in setfl(), but for that we'd need to have FMODE_NDELAY for all files, not just block special files. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
ebbefc011e
commit
fd4ce1acd0
5 changed files with 18 additions and 5 deletions
|
|
@ -757,7 +757,7 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode,
|
|||
* access to the device is prohibited.
|
||||
*/
|
||||
error = scsi_nonblockable_ioctl(sdp, cmd, p,
|
||||
(mode & FMODE_NDELAY_NOW) != 0);
|
||||
(mode & FMODE_NDELAY) != 0);
|
||||
if (!scsi_block_when_processing_errors(sdp) || !error)
|
||||
return error;
|
||||
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
|
|||
* if it doesn't recognise the ioctl
|
||||
*/
|
||||
ret = scsi_nonblockable_ioctl(sdev, cmd, argp,
|
||||
(mode & FMODE_NDELAY_NOW) != 0);
|
||||
(mode & FMODE_NDELAY) != 0);
|
||||
if (ret != -ENODEV)
|
||||
return ret;
|
||||
return scsi_ioctl(sdev, cmd, argp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue