kernel - Fix a few edge cases in subr_blist.c
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 30 Nov 2011 04:41:20 +0000 (20:41 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 30 Nov 2011 04:41:20 +0000 (20:41 -0800)
commit3cd891f0bef92e5d211330fa006be8d9319c4dd0
treefa94c62295759c51bd01be943b443cf6b6290d91
parent6487c9e89eebb098d1588037a6dcfdc21d272fb2
kernel - Fix a few edge cases in subr_blist.c

* In the all-allocated special case set bm_bighint to 0 instead of to
  count.  This fixes an edge case where failed allocations wind up
  traversing too much of the radix tree.

* In the all-free special case be sure to set bm_bighint to the radix,
  higher layers check bm_bighint when recursing.  (This bug could not occur
  unless you had 4 swap devices configured).

* Improve code documentation and minor cleanups.
sys/kern/subr_blist.c