nfs41: decode minorversion 1 cb_compound header

Previous thread: nfs41: Release backchannel resources associated with session by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:03 pm. (1 message)

Next thread: nfs41: store minorversion in cb_compound_hdr_arg by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:03 pm. (1 message)
From: Linux Kernel Mailing List
Date: Monday, June 22, 2009 - 2:03 pm

Gitweb:     http://git.kernel.org/linus/48a9e2d2289ed4b5053b3986d99709e9b07a0923
Commit:     48a9e2d2289ed4b5053b3986d99709e9b07a0923
Parent:     b8f2ef84b079ceb22b42d6d353609db7eb8efa93
Author:     Benny Halevy <bhalevy@panasas.com>
AuthorDate: Wed Apr 1 09:23:20 2009 -0400
Committer:  Benny Halevy <bhalevy@panasas.com>
CommitDate: Wed Jun 17 14:11:35 2009 -0700

    nfs41: decode minorversion 1 cb_compound header
    
    decode cb_compound header conforming to
    http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26
    
    Get rid of cb_compound_hdr_arg.callback_ident
    
    callback_ident is not used anywhere so we shouldn't waste any memory to
    store it.
    
    Signed-off-by: Benny Halevy <bhalevy@panasas.com>
    [nfs41: no need to break read_buf in decode_compound_hdr_arg]
    See http://linux-nfs.org/pipermail/pnfs/2009-June/007844.html
    Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/callback.h     |    1 -
 fs/nfs/callback_xdr.c |    7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
index 51b15c2..a8ffa9d 100644
--- a/fs/nfs/callback.h
+++ b/fs/nfs/callback.h
@@ -27,7 +27,6 @@ struct cb_compound_hdr_arg {
 	unsigned int taglen;
 	const char *tag;
 	unsigned int minorversion;
-	unsigned int callback_ident;
 	unsigned nops;
 };
 
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 91f6f74..f6cc79b 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -147,14 +147,15 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
 	if (unlikely(p == NULL))
 		return htonl(NFS4ERR_RESOURCE);
 	hdr->minorversion = ntohl(*p++);
-	/* Check minor version is zero. */
-	if (hdr->minorversion != 0) {
+	/* Check minor version is zero or one. */
+	if (hdr->minorversion <= 1) {
+		p++;	/* skip callback_ident */
+	} else {
 		printk(KERN_WARNING "%s: NFSv4 server callback with "
 			"illegal minor version %u!\n",
 ...
Previous thread: nfs41: Release backchannel resources associated with session by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:03 pm. (1 message)

Next thread: nfs41: store minorversion in cb_compound_hdr_arg by Linux Kernel Mailing List on Monday, June 22, 2009 - 2:03 pm. (1 message)