• Jeff Mahoney's avatar
    dm: fix idr minor allocation · 84d73ab6
    Jeff Mahoney authored
    One part of the system can attempt to use a mapped device before another has
    finished initialising it or while it is being freed.
    
    This patch introduces a place holder value, MINOR_ALLOCED, to mark the minor
    as allocated but in a state where it can't be used, such as mid-allocation or
    mid-free.  At the end of the initialization, it replaces the place holder with
    the pointer to the mapped_device, making it available to the rest of the dm
    subsystem.
    
    [akpm: too late for 2.6.17 - suitable for 2.6.17.x after it has settled]
    Signed-off-by: default avatarJeff Mahoney <jeffm@suse.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    84d73ab6
dm.c 26.3 KB