• Jeff Mahoney's avatar
    [PATCH] dm: fix idr minor allocation · ba61fdd1
    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>
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    ba61fdd1
dm.c 26.3 KB