Commit 75be0272 authored by Alasdair G. Kergon's avatar Alasdair G. Kergon Committed by Linus Torvalds

[PATCH] device-mapper: dm-raid1 deadlock fix

Fix a dm-raid1 deadlock: nested spinlocks with _irq.
Signed-Off-By: default avatarAlasdair G Kergon <agk@redhat.com>
From: Tim Burgess <tim.burgess@anu.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 84dc7943
...@@ -253,9 +253,9 @@ static struct region *__rh_alloc(struct region_hash *rh, region_t region) ...@@ -253,9 +253,9 @@ static struct region *__rh_alloc(struct region_hash *rh, region_t region)
else { else {
__rh_insert(rh, nreg); __rh_insert(rh, nreg);
if (nreg->state == RH_CLEAN) { if (nreg->state == RH_CLEAN) {
spin_lock_irq(&rh->region_lock); spin_lock(&rh->region_lock);
list_add(&nreg->list, &rh->clean_regions); list_add(&nreg->list, &rh->clean_regions);
spin_unlock_irq(&rh->region_lock); spin_unlock(&rh->region_lock);
} }
reg = nreg; reg = nreg;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment