summaryrefslogtreecommitdiffstats
path: root/fs/lockd/clnt4xdr.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-13 19:49:47 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-04-13 19:50:52 +0200
commite847469bf77a1d339274074ed068d461f0c872bc (patch)
tree4e5e9b3fea923432d6745ed1369100d2b941af0d /fs/lockd/clnt4xdr.c
parentocfs2: ->e_leaf_clusters endianness breakage (diff)
downloadlinux-e847469bf77a1d339274074ed068d461f0c872bc.tar.xz
linux-e847469bf77a1d339274074ed068d461f0c872bc.zip
lockd: fix the endianness bug
comparing be32 values for < is not doing the right thing... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/lockd/clnt4xdr.c')
-rw-r--r--fs/lockd/clnt4xdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
index 3ddcbb1c0a43..13ad1539fbf2 100644
--- a/fs/lockd/clnt4xdr.c
+++ b/fs/lockd/clnt4xdr.c
@@ -241,7 +241,7 @@ static int decode_nlm4_stat(struct xdr_stream *xdr, __be32 *stat)
p = xdr_inline_decode(xdr, 4);
if (unlikely(p == NULL))
goto out_overflow;
- if (unlikely(*p > nlm4_failed))
+ if (unlikely(ntohl(*p) > ntohl(nlm4_failed)))
goto out_bad_xdr;
*stat = *p;
return 0;