mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
Lock the page around hold_count access.
Reviewed by: alc
This commit is contained in:
parent
139a0de7f1
commit
a0b8e597e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=207535
@ -2108,6 +2108,7 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
|
||||
mbstat.sf_iocnt++;
|
||||
}
|
||||
if (error) {
|
||||
vm_page_lock(pg);
|
||||
vm_page_lock_queues();
|
||||
vm_page_unwire(pg, 0);
|
||||
/*
|
||||
@ -2121,6 +2122,7 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
|
||||
vm_page_free(pg);
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
vm_page_unlock(pg);
|
||||
VM_OBJECT_UNLOCK(obj);
|
||||
if (error == EAGAIN)
|
||||
error = 0; /* not a real error */
|
||||
|
Loading…
Reference in New Issue
Block a user