Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153602
b: refs/heads/master
c: b8f2ef8
h: refs/heads/master
v: v3
  • Loading branch information
Benny Halevy committed Jun 17, 2009
1 parent 27d3611 commit e989960
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a0ffe544c54f62be99751e369f4d0f44bd5ee19
refs/heads/master: b8f2ef84b079ceb22b42d6d353609db7eb8efa93
1 change: 1 addition & 0 deletions trunk/fs/nfs/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
12 changes: 7 additions & 5 deletions trunk/fs/nfs/callback_xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit e989960

Please sign in to comment.