All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] SQUASHME: nfs41: no need to break read_buf in decode_compound_hdr_arg
@ 2009-06-17 17:22 Benny Halevy
  0 siblings, 0 replies; only message in thread
From: Benny Halevy @ 2009-06-17 17:22 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: pnfs, linux-nfs

Fixes Trond's review comment from 2009-06-15
Re: [pnfs] [RFC 25/39] nfs41: decode minorversion 1 cb_compound header

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfs/callback_xdr.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 27ac457..654a6a2 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -153,15 +153,12 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
 				__func__, hdr->taglen);
 		return htonl(NFS4ERR_RESOURCE);
 	}
-	p = read_buf(xdr, 4);
+	p = read_buf(xdr, 12);
 	if (unlikely(p == NULL))
 		return htonl(NFS4ERR_RESOURCE);
 	hdr->minorversion = ntohl(*p++);
 	/* Check minor version is zero or one. */
 	if (hdr->minorversion <= 1) {
-		p = read_buf(xdr, 8);
-		if (unlikely(p == NULL))
-			return htonl(NFS4ERR_RESOURCE);
 		p++;	/* skip callback_ident */
 	} else {
 		printk(KERN_WARNING "%s: NFSv4 server callback with "
-- 
1.6.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-17 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 17:22 [PATCH 1/3] SQUASHME: nfs41: no need to break read_buf in decode_compound_hdr_arg Benny Halevy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.