summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2010-07-02 02:40:18 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2010-07-02 02:40:18 +0000
commitbfc9493d9280a5a8ab43b8df30cd772c910140ba (patch)
tree32334a91bf10c89a8551f90fe6749d45476d9ad8 /sys/nfs
parent364840df3893a5f720df05ee307b996c62195a07 (diff)
m_copyback can fail to allocate memory, but is a void fucntion so gymnastics
are required to detect that. Change the function to take a wait argument (used in nfs server, but M_NOWAIT everywhere else for now) and to return an error ok claudio@ henning@ krw@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index e3135766eb1..ca9babb4aeb 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.96 2009/10/19 22:24:18 jsg Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.97 2010/07/02 02:40:17 blambert Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1406,7 +1406,7 @@ nfs_realign(struct mbuf **pm, int hsiz)
if (n != NULL) {
++nfs_realign_count;
while (m) {
- m_copyback(n, off, m->m_len, mtod(m, caddr_t));
+ m_copyback(n, off, m->m_len, mtod(m, caddr_t), M_WAIT);
/*
* If an unaligned amount of memory was copied, fix up