]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dm: add DMF_FREEING
authorJeff Mahoney <jeffm@suse.com>
Mon, 26 Jun 2006 07:27:23 +0000 (00:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Sep 2006 21:51:37 +0000 (14:51 -0700)
commit1d62e5eb23afbc3a36795a165fe2ffae6268b57f
treefc1a6d86f2de63e971e9b151c9263b19423f911c
parent5fcee2b37b0bcec3862c8a20ad9c260b795f18de
dm: add DMF_FREEING

There is a chicken and egg problem between the block layer and dm in which the
gendisk associated with a mapping keeps a reference-less pointer to the
mapped_device.

This patch uses a new flag DMF_FREEING to indicate when the mapped_device is
no longer valid.  This is checked to prevent any attempt to open the device
from succeeding while the device is being destroyed.

[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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm.c