]> err.no Git - linux-2.6/commit
[PATCH] device-mapper raid1: drop mark_region spinlock fix
authorJonathan E Brassow <jbrassow@redhat.com>
Tue, 22 Nov 2005 05:32:37 +0000 (21:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 22 Nov 2005 17:14:31 +0000 (09:14 -0800)
commit7692c5dd48026d952199c2b97c3418f927cc0407
treef198721b3b65a782ae0ed7400120cc45e0ce87c1
parent233886dd32ad71daf9c21bf3728c0933a94870f0
[PATCH] device-mapper raid1: drop mark_region spinlock fix

The spinlock region_lock is held while calling mark_region which can sleep.
Drop the spinlock before calling that function.

A region's state and inclusion in the clean list are altered by rh_inc and
rh_dec.  The state variable is set to RH_CLEAN in rh_dec, but only if
'pending' is zero.  It is set to RH_DIRTY in rh_inc, but not if it is already
so.  The changes to 'pending', the state, and the region's inclusion in the
clean list need to be atomicly.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm-raid1.c