diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-03-20 17:08:46 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-03-20 17:08:46 +0000 |
commit | 7bd854f1a7ce064c94918f5b95fa74a8dfdd3a59 (patch) | |
tree | 2ec607776d545393a55ab6b22ad436dbed0753f1 /sys/ufs/ffs | |
parent | 538a7949110706c377c1930a9cb9ce3220322b6e (diff) |
Even more.
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 9ff74f11b55..66f43c93bef 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_alloc.c,v 1.22 2001/03/20 17:05:38 art Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.23 2001/03/20 17:08:45 art Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -920,7 +920,7 @@ ffs_alloccg(ip, cg, bpref, size) */ if (cgp->cg_cs.cs_nbfree == 0) { brelse(bp); - return (NULL); + return (0); } bno = ffs_alloccgblk(ip, bp, bpref); bpref = dtogd(fs, bno); @@ -936,17 +936,11 @@ ffs_alloccg(ip, cg, bpref, size) return (bno); } bno = ffs_mapsearch(fs, cgp, bpref, allocsiz); -#if 0 - /* - * XXX ffs_mapsearch will panic instead of return -1, and we can't - * XXX return NULL as a daddr_t anyway. - */ if (bno < 0) { brelse(bp); - /* XXX - NULL as a daddr_t ??? */ return (0); } -#endif + for (i = 0; i < frags; i++) clrbit(cg_blksfree(cgp), bno + i); cgp->cg_cs.cs_nffree -= frags; @@ -1066,14 +1060,8 @@ norot: * available one in this cylinder group. */ bno = ffs_mapsearch(fs, cgp, bpref, (int)fs->fs_frag); -#if 0 - /* - * XXX ffs_mapsearch will panic instead of return -1, and we can't - * XXX return NULL as a daddr_t anyway. - */ if (bno < 0) return (0); -#endif cgp->cg_rotor = bno; gotit: blkno = fragstoblks(fs, bno); |