Call the mdcallback immediately after computing bufpages; bufpages may
need to be clipped, and this needs to be done before computing nbuf.
This commit is contained in:
parent
96993ef749
commit
ba2bc023f7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_allocsys.c,v 1.2 1999/05/20 20:01:28 thorpej Exp $ */
|
||||
/* $NetBSD: kern_allocsys.c,v 1.3 1999/05/21 00:05:12 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -177,6 +177,12 @@ allocsys(v, mdcallback)
|
||||
panic("bufpages = 0\n");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Call the mdcallback now; it may need to adjust bufpages.
|
||||
*/
|
||||
if (mdcallback != NULL)
|
||||
v = mdcallback(v);
|
||||
|
||||
/*
|
||||
* Ensure a minimum of 16 buffers.
|
||||
*/
|
||||
@ -205,8 +211,5 @@ allocsys(v, mdcallback)
|
||||
}
|
||||
ALLOCSYS(v, buf, struct buf, nbuf);
|
||||
|
||||
if (mdcallback != NULL)
|
||||
v = mdcallback(v);
|
||||
|
||||
return (v);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user