diff options
author | phk <phk@FreeBSD.org> | 2003-01-03 14:30:46 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-01-03 14:30:46 +0000 |
commit | 88bd74d1841dba3f36f98fb64c7e2a630af3489f (patch) | |
tree | 1d1c4afb47b6f3606e254d491ad14375a8a3f8bd /sys/vm/vm_swap.c | |
parent | 2f7baffed6ea2747341f4ac70543257dcd1b16cc (diff) | |
download | FreeBSD-src-88bd74d1841dba3f36f98fb64c7e2a630af3489f.zip FreeBSD-src-88bd74d1841dba3f36f98fb64c7e2a630af3489f.tar.gz |
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.
Diffstat (limited to 'sys/vm/vm_swap.c')
-rw-r--r-- | sys/vm/vm_swap.c | 5 |
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) { |