Starting in r118390, swaponsomething() began to reserve the blocks at the
beginning of a swap area for a disk label. However, neither r118390 nor r118544, which increased the reservation from one to two blocks, correctly accounted for these blocks when updating the variable "swap_pager_avail". This change corrects that error. Reviewed by: kib MFC after: 5 days
This commit is contained in:
parent
2d15c3cb12
commit
761097c85e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319627
@ -2203,7 +2203,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nblks,
|
||||
sp->sw_end = dvbase + nblks;
|
||||
TAILQ_INSERT_TAIL(&swtailq, sp, sw_list);
|
||||
nswapdev++;
|
||||
swap_pager_avail += nblks;
|
||||
swap_pager_avail += nblks - 2;
|
||||
swap_total += (vm_ooffset_t)nblks * PAGE_SIZE;
|
||||
swapon_check_swzone(swap_total / PAGE_SIZE);
|
||||
swp_sizecheck();
|
||||
|
Loading…
Reference in New Issue
Block a user