diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-03 01:24:31 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-03 01:24:31 +0100 |
commit | 4ccc804586c9ad1622687a24223c6ad2955759cc (patch) | |
tree | 4cb881b7dcd3b63b53756b8d7362c835d1c312f1 /drivers/md | |
parent | open*(2) compat fixes (s390, arm64) (diff) | |
parent | md/raid1{,0}: fix deadlock in bitmap_unplug. (diff) | |
download | linux-4ccc804586c9ad1622687a24223c6ad2955759cc.tar.xz linux-4ccc804586c9ad1622687a24223c6ad2955759cc.zip |
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md
Pull md bugfix from NeilBrown:
"Single bugfix for raid1/raid10.
Fixes a recently introduced deadlock."
* tag 'md-3.7-fixes' of git://neil.brown.name/md:
md/raid1{,0}: fix deadlock in bitmap_unplug.
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid1.c | 2 | ||||
-rw-r--r-- | drivers/md/raid10.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 636bae0405e8..a0f73092176e 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -963,7 +963,7 @@ static void raid1_unplug(struct blk_plug_cb *cb, bool from_schedule) struct r1conf *conf = mddev->private; struct bio *bio; - if (from_schedule) { + if (from_schedule || current->bio_list) { spin_lock_irq(&conf->device_lock); bio_list_merge(&conf->pending_bio_list, &plug->pending); conf->pending_count += plug->pending_cnt; diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 0d5d0ff2c0f7..c9acbd717131 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1069,7 +1069,7 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule) struct r10conf *conf = mddev->private; struct bio *bio; - if (from_schedule) { + if (from_schedule || current->bio_list) { spin_lock_irq(&conf->device_lock); bio_list_merge(&conf->pending_bio_list, &plug->pending); conf->pending_count += plug->pending_cnt; |