summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2007-09-26 16:00:56 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2007-09-26 16:00:56 +0000
commit91f914736b8f6baa287b6db0dd1434d91d2989ef (patch)
treea6dd8042dd493d093984f9c88117aeaf89aa5cc6
parent3eebc6af8e34b225bed1c37a778ce7f61cc59e84 (diff)
nfsm_uiotom macro does nothing but hide error-handling code; replace
inline in the one place that it's called ok thib@, weingart@ "I don't see why not" fgsch@
-rw-r--r--sys/nfs/nfs_vnops.c8
-rw-r--r--sys/nfs/nfsm_subs.h9
2 files changed, 7 insertions, 10 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 5f22c61ecf4..3711b0b999a 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.77 2007/09/20 12:54:31 thib Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.78 2007/09/26 16:00:55 blambert Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -1034,7 +1034,11 @@ nfs_writerpc(vp, uiop, iomode, must_commit)
*tl = x; /* size of this write */
}
- nfsm_uiotom(uiop, len);
+ if ((t1 = nfsm_uiotombuf(uiop, &mb, len, &bpos)) != 0) {
+ error = t1;
+ m_freem(mreq);
+ goto nfsmout;
+ }
nfsm_request(vp, NFSPROC_WRITE, uiop->uio_procp,
VTONFS(vp)->n_wcred);
if (v3) {
diff --git a/sys/nfs/nfsm_subs.h b/sys/nfs/nfsm_subs.h
index f96561b8d45..c9313944c43 100644
--- a/sys/nfs/nfsm_subs.h
+++ b/sys/nfs/nfsm_subs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsm_subs.h,v 1.17 2007/09/11 13:41:52 blambert Exp $ */
+/* $OpenBSD: nfsm_subs.h,v 1.18 2007/09/26 16:00:55 blambert Exp $ */
/* $NetBSD: nfsm_subs.h,v 1.10 1996/03/20 21:59:56 fvdl Exp $ */
/*
@@ -320,13 +320,6 @@
goto nfsmout; \
}
-#define nfsm_uiotom(p,s) \
- if ((t1 = nfsm_uiotombuf((p),&mb,(s),&bpos)) != 0) { \
- error = t1; \
- m_freem(mreq); \
- goto nfsmout; \
- }
-
#define nfsm_reqhead(v,a,s) \
mb = mreq = nfsm_reqh((v),(a),(s),&bpos)