aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/callback_xdr.c')
-rw-r--r--fs/nfs/callback_xdr.c12
1 files changed, 7 insertions, 5 deletions
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