mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] eliminate use of ->f_flags in block methods
store needed information in f_mode Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
aeb5d72706
commit
86d434dede
9 changed files with 26 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue