diff options
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index ed826f8..4b5d0fc 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -523,17 +523,6 @@ nfs_send(struct socket *so, struct sockaddr *nam, struct mbuf *top, return (error); } -static __inline int -nfs_cantrecvmore(struct socket *so) -{ - int ret; - - SOCKBUF_LOCK(&so->so_rcv); - ret = (so->so_rcv.sb_state & SBS_CANTRCVMORE); - SOCKBUF_UNLOCK(&so->so_rcv); - return ret; -} - int nfs_reply(struct nfsreq *rep) { @@ -563,7 +552,7 @@ tryagain: } so = rep->r_nmp->nm_so; mtx_lock(&rep->r_nmp->nm_nfstcpstate.mtx); - if (!so || nfs_cantrecvmore(so) || + if (!so || (rep->r_nmp->nm_nfstcpstate.flags & NFS_TCP_FORCE_RECONNECT)) { mtx_unlock(&rep->r_nmp->nm_nfstcpstate.mtx); error = nfs_reconnect(rep); @@ -767,7 +756,7 @@ nfstcp_readable(struct socket *so, int bytes) SOCKBUF_LOCK(&so->so_rcv); retval = (so->so_rcv.sb_cc >= (bytes) || - (so->so_state & SBS_CANTRCVMORE) || + (so->so_rcv.sb_state & SBS_CANTRCVMORE) || so->so_error); SOCKBUF_UNLOCK(&so->so_rcv); return (retval); |