• Tejun Heo's avatar
    idr: remove length restriction from idr_layer->bitmap · 1d9b2e1e
    Tejun Heo authored
    Currently, idr->bitmap is declared as an unsigned long which restricts
    the number of bits an idr_layer can contain.  All bitops can handle
    arbitrary positive integer bit number and there's no reason for this
    restriction.
    
    Declare idr_layer->bitmap using DECLARE_BITMAP() instead of a single
    unsigned long.
    
    * idr_layer->bitmap is now an array.  '&' dropped from params to
      bitops.
    
    * Replaced "== IDR_FULL" tests with bitmap_full() and removed
      IDR_FULL.
    
    * Replaced find_next_bit() on ~bitmap with find_next_zero_bit().
    
    * Replaced "bitmap = 0" with bitmap_clear().
    
    This patch doesn't (or at least shouldn't) introduce any behavior
    changes.
    
    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    1d9b2e1e
idr.c 28.4 KB