diff options
author | BurnZeZ <devnull@localhost> | 2020-03-29 17:39:30 +0000 |
---|---|---|
committer | BurnZeZ <devnull@localhost> | 2020-03-29 17:39:30 +0000 |
commit | 11025d6f4a2c3c7e75010f85c2d3108e602270b7 (patch) | |
tree | 6bf6624c7a0b5ca1dd6972b4b324f4794eb79665 | |
parent | f5f37ba5eb2a471c1014b406d00a84df87295143 (diff) |
lib9p: fix re-use of root Qid when using createfile(); remove unused dirqidgen
-rw-r--r-- | sys/include/9p.h | 1 | ||||
-rw-r--r-- | sys/src/lib9p/file.c | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/include/9p.h b/sys/include/9p.h index 1a6dfd657..949476232 100644 --- a/sys/include/9p.h +++ b/sys/include/9p.h @@ -152,7 +152,6 @@ struct Tree { /* below is implementation-specific; don't use */ Lock genlock; ulong qidgen; - ulong dirqidgen; }; Tree* alloctree(char*, char*, ulong, void(*destroy)(File*)); diff --git a/sys/src/lib9p/file.c b/sys/src/lib9p/file.c index b2e726cbf..eddef7e4c 100644 --- a/sys/src/lib9p/file.c +++ b/sys/src/lib9p/file.c @@ -337,8 +337,9 @@ alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*)) incref(f); t->root = f; - t->qidgen = 0; - t->dirqidgen = 1; + + /* t->qidgen starts at 1 because root Qid.path is 0 */ + t->qidgen = 1; if(destroy == nil) destroy = nop; t->destroy = destroy; |