[PATCH] dm: fix mapped device ref counting
commit7ec75f254742766eb729f1d1024a5b4e6692fc5f
authorJeff Mahoney <jeffm@suse.com>
Mon, 26 Jun 2006 07:27:24 +0000 (26 00:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:35 +0000 (26 09:58 -0700)
tree67cf98f49397c4f7a71e12afc82c04c7dedbe17f
parentfba9f90e568e17c326257ee293207b75880b39d6
[PATCH] dm: fix mapped device ref counting

To avoid races, _minor_lock must be held while changing mapped device
reference counts.

There are a few paths where a mapped_device pointer is returned before a
reference is taken.  This patch fixes them.

[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-ioctl.c