summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-26 03:15:54 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 09:43:52 +0400
commit8a5e929dd2e05ab4d3d89f58c5e8fca596af8f3a (patch)
tree8cbed05fcd99d24e881e5ea12d8a954865e31085 /drivers
parent554a8b9f54cd7ca2b89f5dc227df08be082fae0d (diff)
downloadlinux-8a5e929dd2e05ab4d3d89f58c5e8fca596af8f3a.tar.xz
don't transliterate lower bits of ->intent.open.flags to FMODE_...
->create() instances are much happier that way... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/pohmelfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/pohmelfs/dir.c b/drivers/staging/pohmelfs/dir.c
index 9732a9666cc4..7598e77672a5 100644
--- a/drivers/staging/pohmelfs/dir.c
+++ b/drivers/staging/pohmelfs/dir.c
@@ -512,7 +512,7 @@ struct dentry *pohmelfs_lookup(struct inode *dir, struct dentry *dentry, struct
int err, lock_type = POHMELFS_READ_LOCK, need_lock = 1;
struct qstr str = dentry->d_name;
- if ((nd->intent.open.flags & O_ACCMODE) > 1)
+ if ((nd->intent.open.flags & O_ACCMODE) != O_RDONLY)
lock_type = POHMELFS_WRITE_LOCK;
if (test_bit(NETFS_INODE_OWNED, &parent->state)) {