summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/node-drop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdiskfs/node-drop.c b/libdiskfs/node-drop.c
index aeeda01b..74744f67 100644
--- a/libdiskfs/node-drop.c
+++ b/libdiskfs/node-drop.c
@@ -24,6 +24,7 @@ void
diskfs_drop_node (struct node *np)
{
mode_t savemode;
+
fshelp_kill_translator (&np->translator);
if (np->dn_stat.st_nlink == 0)
{
@@ -45,6 +46,11 @@ diskfs_drop_node (struct node *np)
np->references++;
spin_unlock (&diskfs_node_refcnt_lock);
diskfs_truncate (np, 0);
+
+ /* Force allocsize to zero; if truncate consistently fails this
+ will at least prevent an infinite loop in this routine. */
+ np->allocsize = 0;
+
diskfs_nput (np);
return;
}