summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ufs/dir.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ufs/dir.c b/ufs/dir.c
index 5906cb01..b2147007 100644
--- a/ufs/dir.c
+++ b/ufs/dir.c
@@ -269,7 +269,11 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type,
if ((err && err != ENOENT)
|| !ds
|| ds->type == LOOKUP)
- vm_deallocate (mach_task_self (), buf, buflen);
+ {
+ vm_deallocate (mach_task_self (), buf, buflen);
+ if (ds)
+ ds->type = LOOKUP; /* set to be ignored by drop_dirstat */
+ }
else
{
ds->mapbuf = buf;