Date: Wed, 17 May 1995 11:10:14 -0700 (PDT) From: Poul-Henning Kamp <phk@ref.tfs.com> To: current@FreeBSD.org Subject: please test this patch for panic("swfree") Message-ID: <199505171810.LAA25818@ref.tfs.com>
next in thread | raw e-mail | index | archive | help
A typical "one off" error. Please test this patch. (David, Rod & John please review.) Poul-Henning Index: vm_swap.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_swap.c,v retrieving revision 1.17 diff -u -r1.17 vm_swap.c --- 1.17 1995/05/14 03:00:10 +++ vm_swap.c 1995/05/17 18:08:26 @@ -241,15 +241,11 @@ sp->sw_nblks = nblks; if (nblks * nswdev > nswap) - nswap = nblks * nswdev; + nswap = (nblks+1) * nswdev; for (dvbase = dmmax; dvbase < nblks; dvbase += dmmax) { blk = nblks - dvbase; - if ((vsbase = index * dmmax + dvbase * nswdev) >= nswap) - panic("swfree"); - if (blk > dmmax) - blk = dmmax; /* XXX -- we need to exclude the first cluster as above */ /* but for now, this will work fine... */ rlist_free(&swaplist, vsbase, vsbase + blk - 1); -- Poul-Henning Kamp <phk@login.dknet.dk> -- TRW Financial Systems, Inc. 'All relevant people are pertinent' && 'All rude people are impertinent' => 'no rude people are relevant'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505171810.LAA25818>