git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Sanitize f_flags helpers
[safe/jmp/linux-2.6]
/
fs
/
open.c
diff --git
a/fs/open.c
b/fs/open.c
index
6daee28
..
040cef7
100644
(file)
--- a/
fs/open.c
+++ b/
fs/open.c
@@
-828,7
+828,7
@@
static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
struct inode *inode;
int error;
- f->f_mode =
(__force fmode_t)((f->f_flags+1) & O_ACCMODE
) | FMODE_LSEEK |
+ f->f_mode =
OPEN_FMODE(f->f_flags
) | FMODE_LSEEK |
FMODE_PREAD | FMODE_PWRITE;
inode = dentry->d_inode;
if (f->f_mode & FMODE_WRITE) {