mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
walk: qid.vers should be ignored (thanks BurnZeZ)
No idea who committed this in 2022 as its "glenda@9front.local", but as qid.vers is incremented for each write and we definitely should not use it as the cache tag. Also, the initial code was stolen from du.c as the comment says, and that one does the right thing.
This commit is contained in:
parent
4374194306
commit
d0f4f620cf
1 changed files with 1 additions and 2 deletions
|
@ -307,11 +307,10 @@ seen(Dir *dir)
|
|||
int i;
|
||||
Cache *c;
|
||||
|
||||
c = &cache[(dir->qid.path^dir->qid.vers)&(NCACHE-1)];
|
||||
c = &cache[dir->qid.path&(NCACHE-1)];
|
||||
dp = c->cache;
|
||||
for(i=0; i<c->n; i++, dp++)
|
||||
if(dir->qid.path == dp->qid.path &&
|
||||
dir->qid.vers == dp->qid.vers &&
|
||||
dir->type == dp->type &&
|
||||
dir->dev == dp->dev)
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue