summaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/cdrom.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-08-26 19:50:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:47:08 -0400
commit86d434dede14108dd917b25af0f29c0cb28b8d18 (patch)
treef69305e5213ac9eab854b8c85a918fd71c106e06 /drivers/cdrom/cdrom.c
parentaeb5d727062a0238a2f96c9c380fbd2be4640c6f (diff)
downloadblackbird-op-linux-86d434dede14108dd917b25af0f29c0cb28b8d18.tar.gz
blackbird-op-linux-86d434dede14108dd917b25af0f29c0cb28b8d18.zip
[PATCH] eliminate use of ->f_flags in block methods
store needed information in f_mode Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/cdrom/cdrom.c')
-rw-r--r--drivers/cdrom/cdrom.c4
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)
/* if this was a O_NONBLOCK open and we should honor the flags,
* do a quick open without drive/disc integrity checks. */
cdi->use_count++;
- if ((fp->f_flags & O_NONBLOCK) && (cdi->options & CDO_USE_FFLAGS)) {
+ if ((fp->f_mode & FMODE_NDELAY) && (cdi->options & CDO_USE_FFLAGS)) {
ret = cdi->ops->open(cdi, 1);
} else {
ret = open_for_data(cdi);
@@ -1205,7 +1205,7 @@ int cdrom_release(struct cdrom_device_info *cdi, struct file *fp)
}
opened_for_data = !(cdi->options & CDO_USE_FFLAGS) ||
- !(fp && fp->f_flags & O_NONBLOCK);
+ !(fp && fp->f_mode & FMODE_NDELAY);
/*
* flush cache on last write release
OpenPOWER on IntegriCloud