hgfs: avoid revlogupdate() calls when reading root (thanks burnzez)

we do not need to check for revlog updates on every
(directory) read when reading the root. only do it
when reading from the start.
This commit is contained in:
cinap_lenrek 2014-05-08 22:20:26 +02:00
parent 428cc541f8
commit f4f2ff6038

View file

@ -663,8 +663,10 @@ fsread(Req *r)
rf = r->fid->aux;
switch(rf->level){
case Qroot:
revlogupdate(&changelog);
revlogupdate(&manifest);
if(off == 0){
revlogupdate(&changelog);
revlogupdate(&manifest);
}
dirread9p(r, rootgen, nil);
respond(r, nil);
return;