Page MenuHomeFreeBSD

D17020.id47650.diff
No OneTemporary

D17020.id47650.diff

Index: sys/kern/subr_blist.c
===================================================================
--- sys/kern/subr_blist.c
+++ sys/kern/subr_blist.c
@@ -224,6 +224,9 @@
u_daddr_t nodes, radix, skip;
int digit;
+ if (blocks == 0)
+ panic("invalid block count");
+
/*
* Calculate the radix and node count used for scanning. Find the last
* block that is followed by a terminator.
@@ -244,7 +247,9 @@
* Count the meta-nodes in the expanded tree, including the final
* terminator, from the bottom level up to the root.
*/
- nodes = (last_block >= blocks) ? 2 : 1;
+ nodes = 1;
+ if (last_block >= blocks || radix - blocks >= BLIST_BMAP_RADIX)
+ nodes++;
last_block /= BLIST_BMAP_RADIX;
while (last_block > 0) {
nodes += last_block + 1;

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 31, 8:40 PM (3 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37720488
Default Alt Text
D17020.id47650.diff (765 B)

Event Timeline