summaryrefslogtreecommitdiff
path: root/libdiskfs/name-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/name-cache.c')
-rw-r--r--libdiskfs/name-cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdiskfs/name-cache.c b/libdiskfs/name-cache.c
index e4a7de91..38688777 100644
--- a/libdiskfs/name-cache.c
+++ b/libdiskfs/name-cache.c
@@ -114,6 +114,8 @@ diskfs_purge_cache (struct node *dp, struct node *np)
if (lc->next)
lc->next->prev = lc->prev;
nxt = lc->next;
+ if (lookup_cache_tail == lc)
+ lookup_cache_tail = lc->prev;
free (lc);
}
else
@@ -136,6 +138,8 @@ _diskfs_purge_cache_deletion (struct node *np)
if (lc->next)
lc->next->prev = lc->prev;
nxt = lc->next;
+ if (lookup_cache_tail == lc)
+ lookup_cache_tail = lc->prev;
free (lc);
}
else