Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Call the mdcallback immediately after computing buf...



details:   https://anonhg.NetBSD.org/src/rev/81f8f1a5a3f3
branches:  trunk
changeset: 473123:81f8f1a5a3f3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 21 00:05:12 1999 +0000

description:
Call the mdcallback immediately after computing bufpages; bufpages may
need to be clipped, and this needs to be done before computing nbuf.

diffstat:

 sys/kern/kern_allocsys.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 818d0e262cb9 -r 81f8f1a5a3f3 sys/kern/kern_allocsys.c
--- a/sys/kern/kern_allocsys.c  Thu May 20 23:25:42 1999 +0000
+++ b/sys/kern/kern_allocsys.c  Fri May 21 00:05:12 1999 +0000
@@ -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 @@
                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, buf, struct buf, nbuf);
 
-       if (mdcallback != NULL)
-               v = mdcallback(v);
-
        return (v);
 }



Home | Main Index | Thread Index | Old Index