]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm: change minor_lock to spinlock
authorJeff Mahoney <jeffm@suse.com>
Mon, 26 Jun 2006 07:27:22 +0000 (00:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Sep 2006 21:51:37 +0000 (14:51 -0700)
commit5fcee2b37b0bcec3862c8a20ad9c260b795f18de
tree4ef559b5b052f395db9f7bcb59d86f9e739c103e
parentcb352363ced7914a6d7d2c17d86e746c4bd582dc
dm: change minor_lock to spinlock

While removing a device, another another thread might attempt to resurrect it.

This patch replaces the _minor_lock mutex with a spinlock and uses
atomic_dec_and_lock() to serialize reference counting in dm_put().

[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