lib9p: fix re-use of root Qid when using createfile(); remove unused dirqidgen
This commit is contained in:
parent
f5f37ba5eb
commit
11025d6f4a
2 changed files with 3 additions and 3 deletions
|
@ -152,7 +152,6 @@ struct Tree {
|
||||||
/* below is implementation-specific; don't use */
|
/* below is implementation-specific; don't use */
|
||||||
Lock genlock;
|
Lock genlock;
|
||||||
ulong qidgen;
|
ulong qidgen;
|
||||||
ulong dirqidgen;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Tree* alloctree(char*, char*, ulong, void(*destroy)(File*));
|
Tree* alloctree(char*, char*, ulong, void(*destroy)(File*));
|
||||||
|
|
|
@ -337,8 +337,9 @@ alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*))
|
||||||
|
|
||||||
incref(f);
|
incref(f);
|
||||||
t->root = 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)
|
if(destroy == nil)
|
||||||
destroy = nop;
|
destroy = nop;
|
||||||
t->destroy = destroy;
|
t->destroy = destroy;
|
||||||
|
|
Loading…
Reference in a new issue