diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-08-31 15:39:30 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-08-31 17:55:57 -0400 |
commit | b7d7ca35807b4c8ca3271885b47e67c843376f77 (patch) | |
tree | 6e8c3d0542d7b023a622e73695cc922dc6bd1b5d /fs/nfsd/nfs4xdr.c | |
parent | c152292f9ee7eb4ed30edc0bd5027a5beef5f5e8 (diff) |
nfsd4: fix off-by-one-error in SEQUENCE reply
The values here represent highest slotid numbers. Since slotid's are
numbered starting from zero, the highest should be one less than the
number of slots.
Reported-by: Rick Macklem <rmacklem@uoguelph.ca>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 04ad9a2ca3d0..f982d8574d95 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -3221,9 +3221,9 @@ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr, | |||
3221 | WRITEMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN); | 3221 | WRITEMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN); |
3222 | WRITE32(seq->seqid); | 3222 | WRITE32(seq->seqid); |
3223 | WRITE32(seq->slotid); | 3223 | WRITE32(seq->slotid); |
3224 | WRITE32(seq->maxslots); | 3224 | /* Note slotid's are numbered from zero: */ |
3225 | /* For now: target_maxslots = maxslots */ | 3225 | WRITE32(seq->maxslots - 1); /* sr_highest_slotid */ |
3226 | WRITE32(seq->maxslots); | 3226 | WRITE32(seq->maxslots - 1); /* sr_target_highest_slotid */ |
3227 | WRITE32(seq->status_flags); | 3227 | WRITE32(seq->status_flags); |
3228 | 3228 | ||
3229 | ADJUST_ARGS(); | 3229 | ADJUST_ARGS(); |