summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-04-03 09:16:27 +0000
committeralc <alc@FreeBSD.org>2004-04-03 09:16:27 +0000
commit1ec4d75266041d6ea34c956b2e1921c1326800e4 (patch)
tree0da7662b4e3ccfb3f8999cccb8a3301194f373ce /sys/kern
parentf18821928b1822e430badc9b8017fe9587228e53 (diff)
downloadFreeBSD-src-1ec4d75266041d6ea34c956b2e1921c1326800e4.zip
FreeBSD-src-1ec4d75266041d6ea34c956b2e1921c1326800e4.tar.gz
In some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, it
should not. Add a new parameter so that the caller can specify which is the case. Reported by: dillon
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_cow.c2
-rw-r--r--sys/kern/uipc_syscalls.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c
index 4a5ccd0..6805804 100644
--- a/sys/kern/uipc_cow.c
+++ b/sys/kern/uipc_cow.c
@@ -138,7 +138,7 @@ socow_setup(struct mbuf *m0, struct uio *uio)
/*
* Allocate an sf buf
*/
- sf = sf_buf_alloc(pp);
+ sf = sf_buf_alloc(pp, PCATCH);
if (!sf) {
vm_page_lock_queues();
vm_page_cowclear(pp);
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 8884a90..295124d 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1919,7 +1919,7 @@ retry_lookup:
* Get a sendfile buf. We usually wait as long as necessary,
* but this wait can be interrupted.
*/
- if ((sf = sf_buf_alloc(pg)) == NULL) {
+ if ((sf = sf_buf_alloc(pg, PCATCH)) == NULL) {
mbstat.sf_allocfail++;
vm_page_lock_queues();
vm_page_unwire(pg, 0);
OpenPOWER on IntegriCloud