When the old nfsm_adv() macro was moved to nfsm_adv_xx(), a '>='

must have been inadvertently changed to '>'. This broke nfsm_adv()
in the case where the advancement count is equal to the amount of
data remaining in the current mbuf. Instead of moving the current
position N bytes forward, nfs_adv() could end up moving it back to
N bytes from the start of the mbuf data.

This should fix the client-side readdirplus problems that have been
reported since September.
This commit is contained in:
Ian Dowse 2001-12-31 06:56:31 +00:00
parent 5ca50a4bc9
commit 6a4b84ea0d

View File

@ -305,7 +305,7 @@ nfsm_adv_xx(int s, struct mbuf **md, caddr_t *dpos)
int t1;
t1 = mtod(*md, caddr_t) + (*md)->m_len - *dpos;
if (t1 > s) {
if (t1 >= s) {
*dpos += s;
return 0;
}