From: Trond Myklebust <trond.myklebust@primarydata.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 1/2] NFSv4.2: Fix up a decoding error in layoutstats
Date: Sat, 27 Jun 2015 11:52:13 -0400 [thread overview]
Message-ID: <1435420334-12967-1-git-send-email-trond.myklebust@primarydata.com> (raw)
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
next reply other threads:[~2015-06-27 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-27 15:52 Trond Myklebust [this message]
2015-06-27 15:52 ` [PATCH 2/2] NFSv4.2: LAYOUTSTATS is optional to implement Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435420334-12967-1-git-send-email-trond.myklebust@primarydata.com \
--to=trond.myklebust@primarydata.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox