aboutsummaryrefslogtreecommitdiffstats
path: root/block/compat_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r--block/compat_ioctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
index d43e6087badc..67eb93cff699 100644
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -722,8 +722,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
722 struct backing_dev_info *bdi; 722 struct backing_dev_info *bdi;
723 loff_t size; 723 loff_t size;
724 724
725 /*
726 * O_NDELAY can be altered using fcntl(.., F_SETFL, ..), so we have
727 * to updated it before every ioctl.
728 */
725 if (file->f_flags & O_NDELAY) 729 if (file->f_flags & O_NDELAY)
726 mode |= FMODE_NDELAY_NOW; 730 mode |= FMODE_NDELAY;
731 else
732 mode &= ~FMODE_NDELAY;
727 733
728 switch (cmd) { 734 switch (cmd) {
729 case HDIO_GETGEO: 735 case HDIO_GETGEO: