]> err.no Git - linux-2.6/commit
[PATCH] dm: fix idr minor allocation
authorJeff Mahoney <jeffm@suse.com>
Mon, 26 Jun 2006 07:27:21 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:34 +0000 (09:58 -0700)
commitba61fdd17d73ddb5c892a9f12383c6c560a20d56
tree7623bd742e2c142a8c5a1d8e5b940095b8673f3f
parent5806f07cd2c32920d5105e0f9ff3117338f34eec
[PATCH] dm: fix idr minor allocation

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: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm.c