diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-26 22:33:24 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-04 10:28:40 -0500 |
commit | 62fb4a155f745285d9b1640c3ef53bf90c12f17c (patch) | |
tree | fbda98158c327b3afa13b7233a2822207b06cb8f /fs/open.c | |
parent | b40ef8696fbbb1107fbe5f4afc21c357f16e5ffc (diff) | |
download | op-kernel-dev-62fb4a155f745285d9b1640c3ef53bf90c12f17c.zip op-kernel-dev-62fb4a155f745285d9b1640c3ef53bf90c12f17c.tar.gz |
don't carry MAY_OPEN in op->acc_mode
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -887,7 +887,7 @@ EXPORT_SYMBOL(dentry_open); static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op) { int lookup_flags = 0; - int acc_mode; + int acc_mode = ACC_MODE(flags); if (flags & (O_CREAT | __O_TMPFILE)) op->mode = (mode & S_IALLUGO) | S_IFREG; @@ -909,7 +909,6 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o if (flags & __O_TMPFILE) { if ((flags & O_TMPFILE_MASK) != O_TMPFILE) return -EINVAL; - acc_mode = MAY_OPEN | ACC_MODE(flags); if (!(acc_mode & MAY_WRITE)) return -EINVAL; } else if (flags & O_PATH) { @@ -919,8 +918,6 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o */ flags &= O_DIRECTORY | O_NOFOLLOW | O_PATH; acc_mode = 0; - } else { - acc_mode = MAY_OPEN | ACC_MODE(flags); } op->open_flag = flags; |