diff options
author | Benny Halevy <bhalevy@panasas.com> | 2009-04-01 09:23:19 -0400 |
---|---|---|
committer | Benny Halevy <bhalevy@panasas.com> | 2009-06-17 17:11:35 -0400 |
commit | b8f2ef84b079ceb22b42d6d353609db7eb8efa93 (patch) | |
tree | 4291e1cb31228344163c66d33cc59246d3b65cff /fs/nfs/callback_xdr.c | |
parent | 5a0ffe544c54f62be99751e369f4d0f44bd5ee19 (diff) |
nfs41: store minorversion in cb_compound_hdr_arg
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/callback_xdr.c')
-rw-r--r-- | fs/nfs/callback_xdr.c | 12 |
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) | |||
132 | static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr) | 132 | static __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 | ||