summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-04-27 20:24:13 +0000
committerMiles Bader <miles@gnu.org>1995-04-27 20:24:13 +0000
commit423eae6bb00314d34bbfbc083e9a51379bab0300 (patch)
treed3e17f15fdbaadba67cbe327790451cb500bc0d5
parenta0c17c4d2999ec5886ac396c45d1bd40bd818987 (diff)
Formerly inode.c.~19~
-rw-r--r--ext2fs/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index b018453c..b6c8b626 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -76,6 +76,7 @@ iget (ino_t inum, struct node **npp)
pokel_init (&dn->indir_pokel, disk_pager->p, disk_image);
dn->fileinfo = 0;
dn->last_page_partially_writable = 0;
+ dn->last_block_allocated = 1;
np = diskfs_make_node (dn);
mutex_lock (&np->lock);
@@ -140,9 +141,14 @@ diskfs_node_norefs (struct node *np)
*np->dn->hprevp = np->dn->hnext;
if (np->dn->hnext)
np->dn->hnext->dn->hprevp = np->dn->hprevp;
+
+ if (np->dn->info.i_prealloc_count)
+ ext2_discard_prealloc (np);
+
if (np->dn->dirents)
free (np->dn->dirents);
assert (!np->dn->fileinfo);
+
free (np->dn);
free (np);
}