ref: f4f2ff6038f47f73775ccc58cd31985d7f169bdc
parent: 428cc541f822e6f49ce26d970b5b030e8b1b696d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu May 8 18:20:26 EDT 2014
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.
--- a/sys/src/cmd/hgfs/fs.c
+++ b/sys/src/cmd/hgfs/fs.c
@@ -663,8 +663,10 @@
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;