1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Revert use of dmmax_mask, I had overlooked a '~'.

Spotted by:	bde
This commit is contained in:
Poul-Henning Kamp 2003-01-03 19:16:48 +00:00
parent bb69b35d8d
commit d6b3a1df18
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108609

View File

@ -350,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_mask) & ~(u_long)dmmax_mask;
aligned_nblks = (nblks + (dmmax -1)) & ~(u_long)(dmmax -1);
if (aligned_nblks * nswdev > nswap)
nswap = aligned_nblks * nswdev;
@ -469,7 +469,7 @@ swapoff(td, uap)
nblks = max(nblks, sp->sw_nblks);
}
aligned_nblks = (nblks + dmmax_mask) & ~(u_long)dmmax_mask;
aligned_nblks = (nblks + (dmmax -1)) & ~(u_long)(dmmax -1);
nswap = aligned_nblks * nswdev;
if (nswap == 0) {