aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 {
26struct cb_compound_hdr_arg { 26struct cb_compound_hdr_arg {
27 unsigned int taglen; 27 unsigned int taglen;
28 const char *tag; 28 const char *tag;
29 unsigned int minorversion;
29 unsigned int callback_ident; 30 unsigned int callback_ident;
30 unsigned nops; 31 unsigned nops;
31}; 32};
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)
132static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr) 132static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr)
133{ 133{
134 __be32 *p; 134 __be32 *p;
135 unsigned int minor_version;
136 __be32 status; 135 __be32 status;
137 136
138 status = decode_string(xdr, &hdr->taglen, &hdr->tag); 137 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
147 p = read_buf(xdr, 12); 146 p = read_buf(xdr, 12);
148 if (unlikely(p == NULL)) 147 if (unlikely(p == NULL))
149 return htonl(NFS4ERR_RESOURCE); 148 return htonl(NFS4ERR_RESOURCE);
150 minor_version = ntohl(*p++); 149 hdr->minorversion = ntohl(*p++);
151 /* Check minor version is zero. */ 150 /* Check minor version is zero. */
152 if (minor_version != 0) { 151 if (hdr->minorversion != 0) {
153 printk(KERN_WARNING "%s: NFSv4 server callback with illegal minor version %u!\n", 152 printk(KERN_WARNING "%s: NFSv4 server callback with "
154 __func__, minor_version); 153 "illegal minor version %u!\n",
154 __func__, hdr->minorversion);
155 return htonl(NFS4ERR_MINOR_VERS_MISMATCH); 155 return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
156 } 156 }
157 hdr->callback_ident = ntohl(*p++); 157 hdr->callback_ident = ntohl(*p++);
158 hdr->nops = ntohl(*p); 158 hdr->nops = ntohl(*p);
159 dprintk("%s: minorversion %d nops %d\n", __func__,
160 hdr->minorversion, hdr->nops);
159 return 0; 161 return 0;
160} 162}
161 163