mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
swap_pager: Unbusy readahead pages after an I/O error
The swap pager itself allocates readahead pages, so should take care to
unbusy them after a read error, just as it does in the non-error case.
PR: 277538
Reviewed by: olce, dougm, alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44646
(cherry picked from commit 4696650782)
This commit is contained in:
parent
14148b5c5c
commit
5128c8948b
1 changed files with 3 additions and 0 deletions
|
|
@ -1686,6 +1686,9 @@ swp_pager_async_iodone(struct buf *bp)
|
|||
* getpages so don't play cute tricks here.
|
||||
*/
|
||||
vm_page_invalid(m);
|
||||
if (i < bp->b_pgbefore ||
|
||||
i >= bp->b_npages - bp->b_pgafter)
|
||||
vm_page_free_invalid(m);
|
||||
} else {
|
||||
/*
|
||||
* If a write error occurs, reactivate page
|
||||
|
|
|
|||
Loading…
Reference in a new issue