mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
c152292f9e
commit
b7d7ca3580
1 changed files with 3 additions and 3 deletions
|
@ -3221,9 +3221,9 @@ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr,
|
|||
WRITEMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN);
|
||||
WRITE32(seq->seqid);
|
||||
WRITE32(seq->slotid);
|
||||
WRITE32(seq->maxslots);
|
||||
/* For now: target_maxslots = maxslots */
|
||||
WRITE32(seq->maxslots);
|
||||
/* Note slotid's are numbered from zero: */
|
||||
WRITE32(seq->maxslots - 1); /* sr_highest_slotid */
|
||||
WRITE32(seq->maxslots - 1); /* sr_target_highest_slotid */
|
||||
WRITE32(seq->status_flags);
|
||||
|
||||
ADJUST_ARGS();
|
||||
|
|
Loading…
Reference in a new issue