Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15045
b: refs/heads/master
c: 3795bb0
h: refs/heads/master
i:
  15043: 2ae9370
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Dec 12, 2005
1 parent c77f80c commit 72932e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0de502aa44aae5712a18d471818d6c785e07c92e
refs/heads/master: 3795bb0fc52fe2af2749f3ad2185cb9c90871ef8
5 changes: 3 additions & 2 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
* this branch is our 'one mirror IO has finished' event handler:
*/
r1_bio->bios[mirror] = NULL;
bio_put(bio);
if (!uptodate) {
md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);
/* an I/O failed, we can't clear the bitmap */
Expand Down Expand Up @@ -377,7 +376,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
}
if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
/* free extra copy of the data pages */
/* FIXME bio has been freed!!! */
int i = bio->bi_vcnt;
while (i--)
__free_page(bio->bi_io_vec[i].bv_page);
Expand All @@ -391,6 +389,9 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
raid_end_bio_io(r1_bio);
}

if (r1_bio->bios[mirror]==NULL)
bio_put(bio);

rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
return 0;
}
Expand Down

0 comments on commit 72932e5

Please sign in to comment.