diff options
author | phk <phk@FreeBSD.org> | 2005-01-03 13:28:56 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-03 13:28:56 +0000 |
commit | 35422188589ddbc76c8eec0238c758bdc478b1d4 (patch) | |
tree | 2e2db46c9d011b8e871ea68e0ef35a8d2e8fc91f /sys/vm | |
parent | 7b194f5bb6367a22fc2f31752a2362d4dfb5145c (diff) | |
download | FreeBSD-src-35422188589ddbc76c8eec0238c758bdc478b1d4.zip FreeBSD-src-35422188589ddbc76c8eec0238c758bdc478b1d4.tar.gz |
When allocating bio's in the swap_pager use M_WAITOK since the
alternative is much worse.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/swap_pager.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 6f931fa..9824bfb 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; |