kern: dev9p: Rwrite's count can be greater than Twrite's one
This commit is contained in:
parent
726217c766
commit
3946a06a98
|
@ -744,10 +744,15 @@ mntrdwr(int type, Chan *c, void *buf, long n, int64_t off)
|
||||||
r->request.count = nreq;
|
r->request.count = nreq;
|
||||||
mountrpc(mnt, r);
|
mountrpc(mnt, r);
|
||||||
nr = r->reply.count;
|
nr = r->reply.count;
|
||||||
if(nr > nreq)
|
if(type == Tread){
|
||||||
nr = nreq;
|
/* in Jehanne, we let the server respond
|
||||||
if(type == Tread)
|
* to Twrite with a count bigger than the
|
||||||
|
* requested
|
||||||
|
*/
|
||||||
|
if(nr > nreq)
|
||||||
|
nr = nreq;
|
||||||
nr = readblist(r->b, (uint8_t*)uba, nr, 0);
|
nr = readblist(r->b, (uint8_t*)uba, nr, 0);
|
||||||
|
}
|
||||||
mntfree(r);
|
mntfree(r);
|
||||||
poperror();
|
poperror();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue