mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-29 06:47:21 +01:00
Panic if no object in biodone. Slightly optimized allocbuf() again.
This commit is contained in:
parent
6f4640cac6
commit
23f762689d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9676
@ -18,7 +18,7 @@
|
||||
* 5. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: vfs_bio.c,v 1.51 1995/07/23 18:49:48 davidg Exp $
|
||||
* $Id: vfs_bio.c,v 1.52 1995/07/23 19:37:52 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -999,8 +999,8 @@ allocbuf(struct buf * bp, int size)
|
||||
if (tinc > bsize)
|
||||
tinc = bsize;
|
||||
off = bp->b_lblkno * bsize;
|
||||
curbpnpages = bp->b_npages;
|
||||
doretry:
|
||||
curbpnpages = bp->b_npages;
|
||||
bp->b_flags |= B_CACHE;
|
||||
for (toff = 0; toff < newbsize; toff += tinc) {
|
||||
int mask;
|
||||
@ -1036,7 +1036,6 @@ allocbuf(struct buf * bp, int size)
|
||||
PAGE_WAKEUP(bp->b_pages[j]);
|
||||
}
|
||||
VM_WAIT;
|
||||
curbpnpages = bp->b_npages;
|
||||
goto doretry;
|
||||
}
|
||||
vm_page_activate(m);
|
||||
@ -1055,7 +1054,6 @@ allocbuf(struct buf * bp, int size)
|
||||
tsleep(m, PRIBIO, "pgtblk", 0);
|
||||
splx(s);
|
||||
|
||||
curbpnpages = bp->b_npages;
|
||||
goto doretry;
|
||||
} else {
|
||||
int pb;
|
||||
@ -1165,7 +1163,7 @@ biodone(register struct buf * bp)
|
||||
foff = vp->v_mount->mnt_stat.f_iosize * bp->b_lblkno;
|
||||
obj = vp->v_object;
|
||||
if (!obj) {
|
||||
return;
|
||||
panic("biodone: no object");
|
||||
}
|
||||
#if defined(VFS_BIO_DEBUG)
|
||||
if (obj->paging_in_progress < bp->b_npages) {
|
||||
|
Loading…
Reference in New Issue
Block a user