summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-04-28 00:03:17 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-04-28 00:03:17 +0000
commitf7c349af1391bec60564894f852b9a97ab7331a0 (patch)
tree61236c91c1cb323d2704294d7d8e71a56d1da7fc /libdiskfs
parentf47b803759a33c6cc0c27d129802e7f7e2c4d8f9 (diff)
(diskfs_drop_node): Deal cleanly with errors in diskfs_truncate.
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;
}