diff options
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r-- | drivers/md/raid10.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 6b86a0032cf8..4343d7ff9916 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -1282,17 +1282,16 @@ static void raid10_write_one_disk(struct mddev *mddev, struct r10bio *r10_bio, | |||
1282 | plug = container_of(cb, struct raid10_plug_cb, cb); | 1282 | plug = container_of(cb, struct raid10_plug_cb, cb); |
1283 | else | 1283 | else |
1284 | plug = NULL; | 1284 | plug = NULL; |
1285 | spin_lock_irqsave(&conf->device_lock, flags); | ||
1286 | if (plug) { | 1285 | if (plug) { |
1287 | bio_list_add(&plug->pending, mbio); | 1286 | bio_list_add(&plug->pending, mbio); |
1288 | plug->pending_cnt++; | 1287 | plug->pending_cnt++; |
1289 | } else { | 1288 | } else { |
1289 | spin_lock_irqsave(&conf->device_lock, flags); | ||
1290 | bio_list_add(&conf->pending_bio_list, mbio); | 1290 | bio_list_add(&conf->pending_bio_list, mbio); |
1291 | conf->pending_count++; | 1291 | conf->pending_count++; |
1292 | } | 1292 | spin_unlock_irqrestore(&conf->device_lock, flags); |
1293 | spin_unlock_irqrestore(&conf->device_lock, flags); | ||
1294 | if (!plug) | ||
1295 | md_wakeup_thread(mddev->thread); | 1293 | md_wakeup_thread(mddev->thread); |
1294 | } | ||
1296 | } | 1295 | } |
1297 | 1296 | ||
1298 | static void raid10_write_request(struct mddev *mddev, struct bio *bio, | 1297 | static void raid10_write_request(struct mddev *mddev, struct bio *bio, |