summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_swap.c')
-rw-r--r--sys/vm/vm_swap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index 3f75289..14530af 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -67,7 +67,6 @@
*/
typedef int32_t swblk_t; /* swap offset */
-extern int dmmax;
#ifndef NSWAPDEV
#define NSWAPDEV 4
@@ -351,7 +350,7 @@ swaponvp(td, vp, dev, nblks)
* DEV_BSIZE'd. aligned_nblks is used to calculate the
* size of the swap bitmap, taking into account the stripe size.
*/
- aligned_nblks = (nblks + (dmmax - 1)) & ~(u_long)(dmmax - 1);
+ aligned_nblks = (nblks + dmmax_mask) & ~(u_long)dmmax_mask;
if (aligned_nblks * nswdev > nswap)
nswap = aligned_nblks * nswdev;
@@ -470,7 +469,7 @@ found:
nblks = max(nblks, sp->sw_nblks);
}
- aligned_nblks = (nblks + (dmmax - 1)) & ~(u_long)(dmmax - 1);
+ aligned_nblks = (nblks + dmmax_mask) & ~(u_long)dmmax_mask;
nswap = aligned_nblks * nswdev;
if (nswap == 0) {
OpenPOWER on IntegriCloud