summaryrefslogtreecommitdiff
path: root/sys/src/cmd/walk.c
diff options
context:
space:
mode:
authorglenda <glenda@9front.local>2022-08-08 16:16:45 +0000
committerglenda <glenda@9front.local>2022-08-08 16:16:45 +0000
commit6d99af6f3455ebc1df29b13f8b1fe7f3338dc074 (patch)
tree2948873fdf81e6f4156f48d9a1def2cccee077df /sys/src/cmd/walk.c
parent55e5418e6945ec3275d34e04047ad706f6eb8e68 (diff)
walk: include qid version in deduplication
the qid version is part of the qid, take it into account for deduplication.
Diffstat (limited to 'sys/src/cmd/walk.c')
-rw-r--r--sys/src/cmd/walk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/walk.c b/sys/src/cmd/walk.c
index ec7636983..6a8c4c441 100644
--- a/sys/src/cmd/walk.c
+++ b/sys/src/cmd/walk.c
@@ -307,10 +307,11 @@ seen(Dir *dir)
int i;
Cache *c;
- c = &cache[dir->qid.path&(NCACHE-1)];
+ c = &cache[(dir->qid.path^dir->qid.vers)&(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;