From cd531ac81186009bb934abb04d47be82465f7205 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 6 Aug 2003 14:13:38 +0000 Subject: Make the first two pages magic to protect the BSD labels rather than only one. --- sys/vm/swap_pager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index e6a6273..b450bf7 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2225,10 +2225,10 @@ swaponvp(td, vp, dev, nblks) sp->sw_blist = blist_create(nblks); /* - * Do not free the first block in order to avoid overwriting + * Do not free the first two block in order to avoid overwriting * any bsd label at the front of the partition */ - blist_free(sp->sw_blist, 1, nblks - 1); + blist_free(sp->sw_blist, 2, nblks - 2); TAILQ_INSERT_TAIL(&swtailq, sp, sw_list); nswapdev++; -- cgit v1.1