From 88bd74d1841dba3f36f98fb64c7e2a630af3489f Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 3 Jan 2003 14:30:46 +0000 Subject: Avoid extern decls in .c files by putting them in the vm/swap_pager.h include file where they belong. Share the dmmax_mask variable. --- sys/vm/vm_swap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/vm/vm_swap.c') 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) { -- cgit v1.1