Commit b6d201a6 authored by Neil Brown's avatar Neil Brown Committed by Ben Collins

[PATCH] Fix raid5 bug where wrong 'dev' is used.

parent 7df5cefd
...@@ -940,7 +940,7 @@ static void handle_stripe(struct stripe_head *sh) ...@@ -940,7 +940,7 @@ static void handle_stripe(struct stripe_head *sh)
/* and fail all 'written' */ /* and fail all 'written' */
bi = sh->dev[i].written; bi = sh->dev[i].written;
sh->dev[i].written = NULL; sh->dev[i].written = NULL;
while (bi && bi->bi_sector < dev->sector + STRIPE_SECTORS) { while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS) {
struct bio *bi2 = bi->bi_next; struct bio *bi2 = bi->bi_next;
clear_bit(BIO_UPTODATE, &bi->bi_flags); clear_bit(BIO_UPTODATE, &bi->bi_flags);
if (--bi->bi_phys_segments == 0) { if (--bi->bi_phys_segments == 0) {
......
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