diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2011-03-04 22:26:41 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2011-03-04 22:26:41 +0000 |
| commit | 96e1934a434672542fce53b642026472affe4946 (patch) | |
| tree | 04dfc30b63b950e08181549826455a0288873ad6 /sys | |
| parent | 5f82cfdf6ca106de788e9adce06c4253adb53fb1 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 392c150c2bbb3..b5e00e64ad859 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1782,17 +1782,13 @@ ffs_nodealloccg(ip, cg, ipref, mode, unused) } } i = start + len - loc; - map = inosused[i]; - ipref = i * NBBY; - for (i = 1; i < (1 << NBBY); i <<= 1, ipref++) { - if ((map & i) == 0) { - cgp->cg_irotor = ipref; - goto gotit; - } + map = inosused[i] ^ 0xff; + if (map == 0) { + printf("fs = %s\n", fs->fs_fsmnt); + panic("ffs_nodealloccg: block not in map"); } - printf("fs = %s\n", fs->fs_fsmnt); - panic("ffs_nodealloccg: block not in map"); - /* NOTREACHED */ + ipref = i * NBBY + ffs(map) - 1; + cgp->cg_irotor = ipref; gotit: /* * Check to see if we need to initialize more inodes. |
