Eliminate unnecessary page hold_count checks. These checks predate
r90944, which introduced a general mechanism for handling the freeing of held pages. Reviewed by: kib@
This commit is contained in:
parent
e119a7bcdb
commit
8189ac85e9
@ -2115,8 +2115,7 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
|
||||
* then free it.
|
||||
*/
|
||||
if (pg->wire_count == 0 && pg->valid == 0 &&
|
||||
pg->busy == 0 && !(pg->oflags & VPO_BUSY) &&
|
||||
pg->hold_count == 0)
|
||||
pg->busy == 0 && !(pg->oflags & VPO_BUSY))
|
||||
vm_page_free(pg);
|
||||
vm_page_unlock(pg);
|
||||
VM_OBJECT_UNLOCK(obj);
|
||||
|
@ -1647,8 +1647,7 @@ vfs_vmio_release(struct buf *bp)
|
||||
* no valid data. We also free the page if the
|
||||
* buffer was used for direct I/O
|
||||
*/
|
||||
if ((bp->b_flags & B_ASYNC) == 0 && !m->valid &&
|
||||
m->hold_count == 0) {
|
||||
if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) {
|
||||
vm_page_free(m);
|
||||
} else if (bp->b_flags & B_DIRECT) {
|
||||
vm_page_try_to_free(m);
|
||||
|
Loading…
Reference in New Issue
Block a user