diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-08-26 19:50:05 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:08 -0400 |
commit | 86d434dede14108dd917b25af0f29c0cb28b8d18 (patch) | |
tree | f69305e5213ac9eab854b8c85a918fd71c106e06 /drivers/cdrom/cdrom.c | |
parent | aeb5d727062a0238a2f96c9c380fbd2be4640c6f (diff) |
[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.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 |