From e03b612d878aadce8cc9d3d1385c1317a6005929 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 23 Oct 1994 20:52:11 +0000 Subject: [PATCH] Only VM_WAIT if curproc != pageproc. A deadlock can occur otherwise. Submitted by: John Dyson --- sys/kern/vfs_bio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index ecfc18c28959..c705741bec42 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: vfs_bio.c,v 1.14 1994/10/05 09:48:21 davidg Exp $ + * $Id: vfs_bio.c,v 1.15 1994/10/18 06:55:40 davidg Exp $ */ #include @@ -706,8 +706,8 @@ vm_hold_load_pages(vm_offset_t froma, vm_offset_t toa) { } } #endif - if (cnt.v_free_count <= - cnt.v_free_reserved + (toa-froma) / PAGE_SIZE) { + if ((curproc != pageproc) && (cnt.v_free_count <= + cnt.v_free_reserved + (toa-froma) / PAGE_SIZE)) { VM_WAIT; goto tryagain; }