- Fix a bug where the bio_data field of the wrong BIO is freed if an error

occurs when doing a RAID5 request.
This commit is contained in:
Ulf Lilleengen 2009-05-06 18:27:28 +00:00
parent 451b95f489
commit 1d8dfc60f4

View File

@ -122,7 +122,7 @@ gv_raid5_start(struct gv_plex *p, struct bio *bp, caddr_t addr, off_t boff,
/* If internal, stop and reset state. */
if (bp->bio_cflags & GV_BIO_INTERNAL) {
if (bp->bio_cflags & GV_BIO_MALLOC)
g_free(cbp->bio_data);
g_free(bp->bio_data);
g_destroy_bio(bp);
/* Reset flags. */
p->flags &= ~(GV_PLEX_SYNCING | GV_PLEX_REBUILDING |