summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-06-27 18:30:57 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-27 18:30:57 +0300
commitda2e8127510525eb4bce0fe34aff06192e042c8f (patch)
tree497aa4db04781e0bed3dcf8c35d2797cb0ee5198 /fs/nfs
parentd620876990f02788d5a663075df007ffb91bdfad (diff)
downloadlinux-da2e8127510525eb4bce0fe34aff06192e042c8f.tar.xz
NFSv4.2: Fix up a decoding error in layoutstats
According to the spec, the server is only returning the status, which we decode in the op header. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs42xdr.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
index 9aae0205ef11..a6bd27da6286 100644
--- a/fs/nfs/nfs42xdr.c
+++ b/fs/nfs/nfs42xdr.c
@@ -241,23 +241,7 @@ out_overflow:
static int decode_layoutstats(struct xdr_stream *xdr,
struct nfs42_layoutstat_res *res)
{
- int status;
- __be32 *p;
-
- status = decode_op_hdr(xdr, OP_LAYOUTSTATS);
- if (status)
- return status;
-
- p = xdr_inline_decode(xdr, 4);
- if (unlikely(!p))
- goto out_overflow;
-
- res->rpc_status = be32_to_cpup(p++);
- return 0;
-
-out_overflow:
- print_overflow_msg(__func__, xdr);
- return -EIO;
+ return decode_op_hdr(xdr, OP_LAYOUTSTATS);
}
/*