/* If we've already created an RPC client, check whether
         * RPC rebind is required
-        * Note: why keep rebinding if we're on a tcp connection?
         */
        if ((clnt = host->h_rpcclnt) != NULL) {
                xprt = clnt->cl_xprt;
-               if (!xprt->stream && time_after_eq(jiffies, host->h_nextrebind)) {
+               if (time_after_eq(jiffies, host->h_nextrebind)) {
                        clnt->cl_port = 0;
                        host->h_nextrebind = jiffies + NLM_HOST_REBIND;
                        dprintk("lockd: next rebind in %ld jiffies\n",
 
        default:
                dprintk("RPC:      sendmsg returned unrecognized error %d\n",
                        -status);
+               xprt_disconnect(xprt);
                break;
        }
 
 }
 
 /**
- * xs_set_buffer_size - set send and receive limits
+ * xs_udp_set_buffer_size - set send and receive limits
  * @xprt: generic transport
  *
  * Set socket send and receive limits based on the
  * sndsize and rcvsize fields in the generic transport
- * structure. This applies only to UDP sockets.
+ * structure.
  */
-static void xs_set_buffer_size(struct rpc_xprt *xprt)
+static void xs_udp_set_buffer_size(struct rpc_xprt *xprt)
 {
        struct sock *sk = xprt->inet;
 
-       if (xprt->stream)
-               return;
        if (xprt->rcvsize) {
                sk->sk_userlocks |= SOCK_RCVBUF_LOCK;
                sk->sk_rcvbuf = xprt->rcvsize * xprt->max_reqs *  2;
        }
 }
 
+/**
+ * xs_tcp_set_buffer_size - set send and receive limits
+ * @xprt: generic transport
+ *
+ * Nothing to do for TCP.
+ */
+static void xs_tcp_set_buffer_size(struct rpc_xprt *xprt)
+{
+       return;
+}
+
 static int xs_bindresvport(struct rpc_xprt *xprt, struct socket *sock)
 {
        struct sockaddr_in myaddr = {
 
                write_unlock_bh(&sk->sk_callback_lock);
        }
-       xs_set_buffer_size(xprt);
+       xs_udp_set_buffer_size(xprt);
        status = 0;
 out:
        xprt_wake_pending_tasks(xprt, status);
 }
 
 static struct rpc_xprt_ops xs_udp_ops = {
-       .set_buffer_size        = xs_set_buffer_size,
+       .set_buffer_size        = xs_udp_set_buffer_size,
        .connect                = xs_connect,
        .send_request           = xs_udp_send_request,
        .close                  = xs_close,
 };
 
 static struct rpc_xprt_ops xs_tcp_ops = {
-       .set_buffer_size        = xs_set_buffer_size,
+       .set_buffer_size        = xs_tcp_set_buffer_size,
        .connect                = xs_connect,
        .send_request           = xs_tcp_send_request,
        .close                  = xs_close,
        xprt->prot = IPPROTO_UDP;
        xprt->port = XS_MAX_RESVPORT;
        xprt->tsh_size = 0;
-       xprt->stream = 0;
        xprt->nocong = 0;
        xprt->cwnd = RPC_INITCWND;
        xprt->resvport = capable(CAP_NET_BIND_SERVICE) ? 1 : 0;
        xprt->prot = IPPROTO_TCP;
        xprt->port = XS_MAX_RESVPORT;
        xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32);
-       xprt->stream = 1;
        xprt->nocong = 1;
        xprt->cwnd = RPC_MAXCWND(xprt);
        xprt->resvport = capable(CAP_NET_BIND_SERVICE) ? 1 : 0;