nfs41: store minorversion in cb_compound_hdr_arg
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
This commit is contained in:
parent
5a0ffe544c
commit
b8f2ef84b0
@ -26,6 +26,7 @@ enum nfs4_callback_opnum {
|
|||||||
struct cb_compound_hdr_arg {
|
struct cb_compound_hdr_arg {
|
||||||
unsigned int taglen;
|
unsigned int taglen;
|
||||||
const char *tag;
|
const char *tag;
|
||||||
|
unsigned int minorversion;
|
||||||
unsigned int callback_ident;
|
unsigned int callback_ident;
|
||||||
unsigned nops;
|
unsigned nops;
|
||||||
};
|
};
|
||||||
|
@ -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)
|
static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound_hdr_arg *hdr)
|
||||||
{
|
{
|
||||||
__be32 *p;
|
__be32 *p;
|
||||||
unsigned int minor_version;
|
|
||||||
__be32 status;
|
__be32 status;
|
||||||
|
|
||||||
status = decode_string(xdr, &hdr->taglen, &hdr->tag);
|
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);
|
p = read_buf(xdr, 12);
|
||||||
if (unlikely(p == NULL))
|
if (unlikely(p == NULL))
|
||||||
return htonl(NFS4ERR_RESOURCE);
|
return htonl(NFS4ERR_RESOURCE);
|
||||||
minor_version = ntohl(*p++);
|
hdr->minorversion = ntohl(*p++);
|
||||||
/* Check minor version is zero. */
|
/* Check minor version is zero. */
|
||||||
if (minor_version != 0) {
|
if (hdr->minorversion != 0) {
|
||||||
printk(KERN_WARNING "%s: NFSv4 server callback with illegal minor version %u!\n",
|
printk(KERN_WARNING "%s: NFSv4 server callback with "
|
||||||
__func__, minor_version);
|
"illegal minor version %u!\n",
|
||||||
|
__func__, hdr->minorversion);
|
||||||
return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
|
return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
|
||||||
}
|
}
|
||||||
hdr->callback_ident = ntohl(*p++);
|
hdr->callback_ident = ntohl(*p++);
|
||||||
hdr->nops = ntohl(*p);
|
hdr->nops = ntohl(*p);
|
||||||
|
dprintk("%s: minorversion %d nops %d\n", __func__,
|
||||||
|
hdr->minorversion, hdr->nops);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user