diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-07-23 15:49:56 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-30 18:09:13 -0400 |
commit | f44106e2173f08ccb1c9195d85a6c22388b461c1 (patch) | |
tree | cc11631a86516803ed27a40b17f5127e74fb52c9 /fs/nfs/nfs4proc.c | |
parent | c95908e4c50d218f016e3866f5abf786055df635 (diff) | |
download | op-kernel-dev-f44106e2173f08ccb1c9195d85a6c22388b461c1.zip op-kernel-dev-f44106e2173f08ccb1c9195d85a6c22388b461c1.tar.gz |
nfs: fix fl_type tests in NFSv4 code
fl_type is not a bitmap.
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5e373c3..6843e0a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4885,7 +4885,7 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request) * Don't rely on the VFS having checked the file open mode, * since it won't do this for flock() locks. */ - switch (request->fl_type & (F_RDLCK|F_WRLCK|F_UNLCK)) { + switch (request->fl_type) { case F_RDLCK: if (!(filp->f_mode & FMODE_READ)) return -EBADF; |