Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/raidframe If we can't malloc a RF_ShutdownList then ...



details:   https://anonhg.NetBSD.org/src/rev/cc2062ef79c7
branches:  trunk
changeset: 480487:cc2062ef79c7
user:      oster <oster%NetBSD.org@localhost>
date:      Thu Jan 13 23:41:18 2000 +0000

description:
If we can't malloc a RF_ShutdownList then we should return ENOMEM right away.
Waiting for more kernel memory to come along can cause more problems than
we're willing to deal with right now.

diffstat:

 sys/dev/raidframe/rf_shutdown.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r fe20891d8828 -r cc2062ef79c7 sys/dev/raidframe/rf_shutdown.c
--- a/sys/dev/raidframe/rf_shutdown.c   Thu Jan 13 23:26:35 2000 +0000
+++ b/sys/dev/raidframe/rf_shutdown.c   Thu Jan 13 23:41:18 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_shutdown.c,v 1.5 2000/01/08 22:57:31 oster Exp $    */
+/*     $NetBSD: rf_shutdown.c,v 1.6 2000/01/13 23:41:18 oster Exp $    */
 /*
  * rf_shutdown.c
  */
@@ -59,7 +59,10 @@
          * Have to directly allocate memory here, since we start up before
          * and shutdown after RAIDframe internal allocation system.
          */
-       ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), M_RAIDFRAME, M_WAITOK);
+       /*      ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), 
+               M_RAIDFRAME, M_WAITOK); */
+       ent = (RF_ShutdownList_t *) malloc(sizeof(RF_ShutdownList_t), 
+                                          M_RAIDFRAME, M_NOWAIT);
        if (ent == NULL)
                return (ENOMEM);
        ent->cleanup = cleanup;



Home | Main Index | Thread Index | Old Index