summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2004-04-08 07:14:34 +0000
committerMike Silbersack <silby@FreeBSD.org>2004-04-08 07:14:34 +0000
commite8410540b7978e62052406bee6a749ea3ae14708 (patch)
tree6bfadd567750cec01ed1821d574b3728fa4551aa
parentece267ba5836da2ae2e193d4db9092e15c0b67fe (diff)
Notes
-rw-r--r--sys/kern/uipc_syscalls.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 3a079917bd56..b5ab1def746a 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1804,8 +1804,14 @@ retry_lookup:
xfsize = PAGE_SIZE - pgoff;
if (uap->nbytes && xfsize > (uap->nbytes - sbytes))
xfsize = uap->nbytes - sbytes;
- if (xfsize <= 0)
- break;
+ if (xfsize <= 0) {
+ if (m_header != NULL) {
+ m = m_header;
+ m_header = NULL;
+ goto retry_space;
+ } else
+ break;
+ }
/*
* Optimize the non-blocking case by looking at the socket space
* before going to the extra work of constituting the sf_buf.