git: idr : Fix logic error in binary tree allocation

Joris Giovannangeli joris at crater.dragonflybsd.org
Mon Dec 2 16:58:37 PST 2013


commit a7e8e305db18729dbc88f53861705fa8d07b43ab
Author: Joris Giovannangeli <joris at dragonflybsd.org>
Date:   Tue Dec 3 01:55:27 2013 +0100

    idr : Fix logic error in binary tree allocation
    
     * A complete binary tree has 2^n - 1 nodes, not 2^n. Changes default size
       to be 2^n - 1.
    
     * While here, also add proper locking directives to idr_grow and idr_remove_all

Summary of changes:
 sys/libkern/linux_idr.c | 34 +++++++++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a7e8e305db18729dbc88f53861705fa8d07b43ab


-- 
DragonFly BSD source repository



More information about the Commits mailing list