summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-01 09:23:19 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 14:11:35 -0700
commitb8f2ef84b079ceb22b42d6d353609db7eb8efa93 (patch)
tree4291e1cb31228344163c66d33cc59246d3b65cff /fs/nfs
parent5a0ffe544c54f62be99751e369f4d0f44bd5ee19 (diff)
nfs41: store minorversion in cb_compound_hdr_arg
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback.h1
-rw-r--r--fs/nfs/callback_xdr.c12
2 files changed, 8 insertions, 5 deletions
diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
index 88d2e1135b5a..51b15c2d3a56 100644
--- a/fs/nfs/callback.h
+++ b/fs/nfs/callback.h
@@ -26,6 +26,7 @@ enum nfs4_callback_opnum {
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 dd0ef34b5845..91f6f74ffea7 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -132,7 +132,6 @@ static __be32 decode_stateid(struct xdr_stream *xdr, nfs4_stateid *stateid)
static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr)
{
__be32 *p;
- unsigned int minor_version;
__be32 status;
status = decode_string(xdr, &hdr->taglen, &hdr->tag);
@@ -147,15 +146,18 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
p = read_buf(xdr, 12);
if (unlikely(p == NULL))
return htonl(NFS4ERR_RESOURCE);
- minor_version = ntohl(*p++);
+ hdr->minorversion = ntohl(*p++);
/* Check minor version is zero. */
- if (minor_version != 0) {
- printk(KERN_WARNING "%s: NFSv4 server callback with illegal minor version %u!\n",
- __func__, minor_version);
+ if (hdr->minorversion != 0) {
+ printk(KERN_WARNING "%s: NFSv4 server callback with "
+ "illegal minor version %u!\n",
+ __func__, hdr->minorversion);
return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
}
hdr->callback_ident = ntohl(*p++);
hdr->nops = ntohl(*p);
+ dprintk("%s: minorversion %d nops %d\n", __func__,
+ hdr->minorversion, hdr->nops);
return 0;
}