Don't use 'bp' after its destruction!

This commit is contained in:
Pawel Jakub Dawidek 2004-08-05 14:07:21 +00:00
parent 9bab5050fc
commit db332970e7

View File

@ -984,10 +984,9 @@ g_mirror_sync_request(struct bio *bp)
return;
}
G_MIRROR_LOGREQ(3, bp, "Synchronization request finished.");
g_destroy_bio(bp);
disk->d_sync.ds_offset_done = bp->bio_offset + bp->bio_length;
if (bp->bio_offset + bp->bio_length ==
sc->sc_provider->mediasize) {
g_destroy_bio(bp);
if (disk->d_sync.ds_offset_done == sc->sc_provider->mediasize) {
/*
* Disk up-to-date, activate it.
*/