summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-07-23 21:49:56 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-31 00:09:13 +0200
commitf44106e2173f08ccb1c9195d85a6c22388b461c1 (patch)
treecc11631a86516803ed27a40b17f5127e74fb52c9 /fs/nfs/nfs4xdr.c
parentNFS: fix pnfs regression with directio writes (diff)
downloadlinux-f44106e2173f08ccb1c9195d85a6c22388b461c1.tar.xz
linux-f44106e2173f08ccb1c9195d85a6c22388b461c1.zip
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/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 610ebccbde5d..6cbd602e26d5 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1236,7 +1236,7 @@ static void encode_link(struct xdr_stream *xdr, const struct qstr *name, struct
static inline int nfs4_lock_type(struct file_lock *fl, int block)
{
- if ((fl->fl_type & (F_RDLCK|F_WRLCK|F_UNLCK)) == F_RDLCK)
+ if (fl->fl_type == F_RDLCK)
return block ? NFS4_READW_LT : NFS4_READ_LT;
return block ? NFS4_WRITEW_LT : NFS4_WRITE_LT;
}