diff options
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/cdrom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index d47f2f80accd..4feefa622aed 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -982,7 +982,7 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp) | |||
982 | /* if this was a O_NONBLOCK open and we should honor the flags, | 982 | /* if this was a O_NONBLOCK open and we should honor the flags, |
983 | * do a quick open without drive/disc integrity checks. */ | 983 | * do a quick open without drive/disc integrity checks. */ |
984 | cdi->use_count++; | 984 | cdi->use_count++; |
985 | if ((fp->f_flags & O_NONBLOCK) && (cdi->options & CDO_USE_FFLAGS)) { | 985 | if ((fp->f_mode & FMODE_NDELAY) && (cdi->options & CDO_USE_FFLAGS)) { |
986 | ret = cdi->ops->open(cdi, 1); | 986 | ret = cdi->ops->open(cdi, 1); |
987 | } else { | 987 | } else { |
988 | ret = open_for_data(cdi); | 988 | ret = open_for_data(cdi); |
@@ -1205,7 +1205,7 @@ int cdrom_release(struct cdrom_device_info *cdi, struct file *fp) | |||
1205 | } | 1205 | } |
1206 | 1206 | ||
1207 | opened_for_data = !(cdi->options & CDO_USE_FFLAGS) || | 1207 | opened_for_data = !(cdi->options & CDO_USE_FFLAGS) || |
1208 | !(fp && fp->f_flags & O_NONBLOCK); | 1208 | !(fp && fp->f_mode & FMODE_NDELAY); |
1209 | 1209 | ||
1210 | /* | 1210 | /* |
1211 | * flush cache on last write release | 1211 | * flush cache on last write release |