aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2008-03-25 09:39:02 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2008-03-25 09:39:02 +0000
commitea26d587291046c59102b34124187e7f602ee07d (patch)
treecf0376c9359f2d1ca6e4e8e4ad4a4f722dba61a7 /sys/netsmb
parentb2798e25738fc58f40da5f2fe18186b8efc3c2c6 (diff)
downloadsrc-ea26d587291046c59102b34124187e7f602ee07d.tar.gz
src-ea26d587291046c59102b34124187e7f602ee07d.zip
Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.
Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation.
Notes
Notes: svn path=/head/; revision=177599
Diffstat (limited to 'sys/netsmb')
-rw-r--r--sys/netsmb/smb_iod.c4
-rw-r--r--sys/netsmb/smb_rq.c4
-rw-r--r--sys/netsmb/smb_trantcp.c4
3 files changed, 4 insertions, 8 deletions
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
index e265f4332a0c..860ff4b291af 100644
--- a/sys/netsmb/smb_iod.c
+++ b/sys/netsmb/smb_iod.c
@@ -261,8 +261,8 @@ smb_iod_sendrq(struct smbiod *iod, struct smb_rq *rqp)
}
SMBSDEBUG("M:%04x, P:%04x, U:%04x, T:%04x\n", rqp->sr_mid, 0, 0, 0);
m_dumpm(rqp->sr_rq.mb_top);
- m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, M_TRYWAIT);
- error = rqp->sr_lerror = m ? SMB_TRAN_SEND(vcp, m, td) : ENOBUFS;
+ m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, M_WAIT);
+ error = rqp->sr_lerror = SMB_TRAN_SEND(vcp, m, td);
if (error == 0) {
getnanotime(&rqp->sr_timesent);
iod->iod_lastrqsent = rqp->sr_timesent;
diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c
index fb7e5d55d8fd..5d2557ce09b7 100644
--- a/sys/netsmb/smb_rq.c
+++ b/sys/netsmb/smb_rq.c
@@ -433,9 +433,7 @@ smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
struct mbuf *m, *m0;
int len;
- m0 = m_split(mtop, offset, M_TRYWAIT);
- if (m0 == NULL)
- return EBADRPC;
+ m0 = m_split(mtop, offset, M_WAIT);
len = m_length(m0, &m);
m->m_len -= len - count;
if (mdp->md_top == NULL) {
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index 5e34943ed476..88fd55635eea 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -572,9 +572,7 @@ smb_nbst_send(struct smb_vc *vcp, struct mbuf *m0, struct thread *td)
error = ENOTCONN;
goto abort;
}
- M_PREPEND(m0, 4, M_TRYWAIT);
- if (m0 == NULL)
- return ENOBUFS;
+ M_PREPEND(m0, 4, M_WAIT);
nb_sethdr(m0, NB_SSN_MESSAGE, m_fixhdr(m0) - 4);
error = nb_sosend(nbp->nbp_tso, m0, 0, td);
return error;