mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
Check return value of g_clone_bio().
This commit is contained in:
parent
133c1315d5
commit
a42106534f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110477
@ -194,6 +194,10 @@ g_disk_start(struct bio *bp)
|
||||
case BIO_READ:
|
||||
case BIO_WRITE:
|
||||
bp2 = g_clone_bio(bp);
|
||||
if (bp2 == NULL) {
|
||||
error = ENOMEM;
|
||||
break;
|
||||
}
|
||||
bp2->bio_done = g_disk_done;
|
||||
bp2->bio_blkno = bp2->bio_offset >> DEV_BSHIFT;
|
||||
bp2->bio_pblkno = bp2->bio_offset / dp->d_sectorsize;
|
||||
|
Loading…
Reference in New Issue
Block a user