public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] NFSv4.2: Fix up a decoding error in layoutstats
@ 2015-06-27 15:52 Trond Myklebust
  2015-06-27 15:52 ` [PATCH 2/2] NFSv4.2: LAYOUTSTATS is optional to implement Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Trond Myklebust @ 2015-06-27 15:52 UTC (permalink / raw)
  To: linux-nfs

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>
---
 fs/nfs/nfs42xdr.c | 18 +-----------------
 1 file changed, 1 insertion(+), 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);
 }
 
 /*
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-27 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-27 15:52 [PATCH 1/2] NFSv4.2: Fix up a decoding error in layoutstats Trond Myklebust
2015-06-27 15:52 ` [PATCH 2/2] NFSv4.2: LAYOUTSTATS is optional to implement Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox