1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Only VM_WAIT if curproc != pageproc. A deadlock can occur otherwise.

Submitted by:	John Dyson
This commit is contained in:
David Greenman 1994-10-23 20:52:11 +00:00
parent 63a7edc49d
commit e03b612d87
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3813

View File

@ -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 <sys/param.h>
@ -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;
}