Skip to content

Commit

Permalink
Merge tag 'md-3.7-fixes' of git://neil.brown.name/md
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Linus Torvalds committed Dec 3, 2012
2 parents 9d73fc2 + 874807a commit 4ccc804
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ccc804

Please sign in to comment.