diff options
| author | Michael I. Bushnell <mib@gnu.org> | 1996-04-18 19:06:20 +0000 |
|---|---|---|
| committer | Michael I. Bushnell <mib@gnu.org> | 1996-04-18 19:06:20 +0000 |
| commit | b69508c00daf432e4d21e72800ac58f950b967d4 (patch) | |
| tree | 85c0eefd7fbf9cf8a1fd74285ed0e1ae73445727 /ufs | |
| parent | f8849fe3bc59296bee95db4a5b13a1275edaf2e5 (diff) | |
(ffs_realloccg): If we are allocating a new block, don't actually free
the old one here.
Diffstat (limited to 'ufs')
| -rw-r--r-- | ufs/alloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ufs/alloc.c b/ufs/alloc.c index 8f6a5baf..4cbac331 100644 --- a/ufs/alloc.c +++ b/ufs/alloc.c @@ -1,5 +1,5 @@ /* Disk allocation routines - Copyright (C) 1993, 1994, 1995 Free Software Foundation + Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation This file is part of the GNU Hurd. @@ -308,7 +308,10 @@ ffs_realloccg(register struct node *np, bp->b_blkno = fsbtodb(fs, bno); (void) vnode_pager_uncache(ITOV(ip)); #endif - ffs_blkfree(np, bprev, (long)osize); +/* Commented out here for Hurd; we don't want to free this until we've + saved the old contents. Callers are responsible for freeing the + block when they are done with it. */ +/* ffs_blkfree(np, bprev, (long)osize); */ if (nsize < request) ffs_blkfree(np, bno + numfrags(fs, nsize), (long)(request - nsize)); @@ -563,7 +566,7 @@ diskfs_alloc_node (struct node *dir, spin_unlock (&alloclock); if (ino == 0) goto noinodes; - error = iget (ino, &np); + error = diskfs_cached_lookup (ino, &np); assert ("duplicate allocation" && !np->dn_stat.st_mode); assert (!np->istranslated); if (np->dn_stat.st_blocks) { |
