From 423eae6bb00314d34bbfbc083e9a51379bab0300 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 27 Apr 1995 20:24:13 +0000 Subject: Formerly inode.c.~19~ --- ext2fs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext2fs/inode.c') 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); } -- cgit v1.2.3