summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid6main.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2005-11-28 13:44:10 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-28 14:42:25 -0800
commit700e432d8364ce59c521abbe03a522051610ebc2 (patch)
tree50293a973edfc2cc39858367d50497416473fb5b /drivers/md/raid6main.c
parent22dfdf5212e5864b844f629736fb993d4611f190 (diff)
downloadop-kernel-dev-700e432d8364ce59c521abbe03a522051610ebc2.zip
op-kernel-dev-700e432d8364ce59c521abbe03a522051610ebc2.tar.gz
[PATCH] md: fix locking problem in r5/r6
bitmap_unplug actually writes data (bits) to storage, so we shouldn't be holding a spinlock... Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid6main.c')
-rw-r--r--drivers/md/raid6main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index eae5a35..17d88d9 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -1784,7 +1784,9 @@ static void raid6d (mddev_t *mddev)
if (conf->seq_flush - conf->seq_write > 0) {
int seq = conf->seq_flush;
+ spin_unlock_irq(&conf->device_lock);
bitmap_unplug(mddev->bitmap);
+ spin_lock_irq(&conf->device_lock);
conf->seq_write = seq;
activate_bit_delay(conf);
}
OpenPOWER on IntegriCloud