diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
| commit | 6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch) | |
| tree | 314123bcab78ff295f38f85f31dc141e5fe22d15 /os/port/exportfs.c | |
| parent | 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff) | |
20061220
Diffstat (limited to 'os/port/exportfs.c')
| -rw-r--r-- | os/port/exportfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/os/port/exportfs.c b/os/port/exportfs.c index 354574ef..c8755fa8 100644 --- a/os/port/exportfs.c +++ b/os/port/exportfs.c @@ -511,6 +511,7 @@ exslave(void*) Export *fs; Exq *q, *t, *fq, **last; char *err; + int nstat; for(;;){ qlock(&exq.qwait); @@ -569,7 +570,11 @@ exslave(void*) break; case Tstat: q->out.stat = q->buf + MSGHDRSZ + BIT16SZ; /* leaves it just where we want it */ - q->out.nstat = q->bsize-(MSGHDRSZ+BIT16SZ); + nstat = q->bsize; + if(nstat > STATMAX) + nstat = STATMAX; + nstat -= MSGHDRSZ+BIT16SZ; + q->out.nstat = nstat; break; } err = (*fcalls[q->in.type])(fs, &q->in, &q->out); |
