aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2005-01-03 13:28:56 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2005-01-03 13:28:56 +0000
commit4f8205e5d1f3c5d7c4524e203a703e53a85984ae (patch)
tree2e2db46c9d011b8e871ea68e0ef35a8d2e8fc91f /sys
parent9fd851bb17690e1e72bc5e2af9f87499717f597b (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/swap_pager.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 6f931fa00dc20..9824bfb84b736 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -2369,18 +2369,19 @@ swapgeom_strategy(struct buf *bp, struct swdevt *sp)
bufdone(bp);
return;
}
- bio = g_new_bio();
+ bio = g_alloc_bio();
+#if 0
+ /*
+ * XXX: We shouldn't really sleep here when we run out of buffers
+ * XXX: but the alternative is worse right now.
+ */
if (bio == NULL) {
- /*
- * XXX: This is better than panicing, but not much better.
- * XXX: Somehow this should be retried. A more generic
- * XXX: implementation of ENOMEM in geom may be able to cope.
- */
bp->b_error = ENOMEM;
bp->b_ioflags |= BIO_ERROR;
bufdone(bp);
return;
}
+#endif
bio->bio_caller2 = bp;
bio->bio_cmd = bp->b_iocmd;
bio->bio_data = bp->b_data;