diff --git a/sys/vm/default_pager.c b/sys/vm/default_pager.c index dae1837d4a72..92db1495c2c4 100644 --- a/sys/vm/default_pager.c +++ b/sys/vm/default_pager.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: default_pager.c,v 1.5 1995/12/14 09:54:46 phk Exp $ + * $Id: default_pager.c,v 1.6 1996/01/19 03:59:36 dyson Exp $ */ #include @@ -125,10 +125,12 @@ default_pager_putpages(object, m, c, sync, rtvals) object->type = OBJT_SWAP; if (swap_pager_swp_alloc(object, M_KERNEL) != 0) { - object->type = OBJT_DEFAULT; - for (i = 0; i < c; i++) - rtvals[i] = VM_PAGER_FAIL; - return VM_PAGER_FAIL; + if (swap_pager_swp_alloc(object, M_NOWAIT) != 0) { + object->type = OBJT_DEFAULT; + for (i = 0; i < c; i++) + rtvals[i] = VM_PAGER_FAIL; + return VM_PAGER_FAIL; + } } return swap_pager_putpages(object, m, c, sync, rtvals);