summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-13 14:19:25 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-13 14:19:25 +0000
commite1e095bd5bc2349232ea07c4e9b83c4128ee1723 (patch)
tree6d0f5199b09d5fffc61a8cd19221b92d6c985093 /sys/ufs/ffs
parentd1140c0a8dee13fc9f7cd94e06debd3ddd745f52 (diff)
Add two controlled panics instead of some code that I need to write later.
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index a409e6dd41a..1d66094cc06 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.24 2001/11/06 19:53:21 miod Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.25 2001/11/13 14:19:24 art Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
*
@@ -1325,6 +1325,12 @@ softdep_setup_allocdirect(ip, lbn, newblkno, oldblkno, newsize, oldsize, bp)
LIST_REMOVE(newblk, nb_hash);
FREE(newblk, M_NEWBLK);
+ if (bp == NULL) {
+ /*
+ * XXXUBC - Yes, I know how to fix this, but not right now.
+ */
+ panic("softdep_setup_allocdirect: Bonk art in the head\n");
+ }
WORKLIST_INSERT(&bp->b_dep, &adp->ad_list);
if (lbn >= NDADDR) {
/* allocating an indirect block */
@@ -1556,6 +1562,12 @@ softdep_setup_allocindir_page(ip, lbn, bp, ptrno, newblkno, oldblkno, nbp)
if ((ip->i_ffs_mode & IFMT) == IFDIR &&
pagedep_lookup(ip, lbn, DEPALLOC, &pagedep) == 0)
WORKLIST_INSERT(&nbp->b_dep, &pagedep->pd_list);
+ if (nbp == NULL) {
+ /*
+ * XXXUBC - Yes, I know how to fix this, but not right now.
+ */
+ panic("softdep_setup_allocindir_page: Bonk art in the head\n");
+ }
WORKLIST_INSERT(&nbp->b_dep, &aip->ai_list);
FREE_LOCK(&lk);
setup_allocindir_phase2(bp, ip, aip);