diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 1da4ab2..61b7a58 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -269,6 +269,7 @@ smb_sendv(struct TCP_Server_Info *server, struct kvec
*iov, int n_vec)
                   to kill the socket so the server throws away the partial
                   SMB */
                server->tcpStatus = CifsNeedReconnect;
+               rc = -EAGAIN;
        }
        if (rc < 0) {
@@ -505,8 +506,13 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo
*ses,
        mutex_unlock(&ses->server->srv_mutex);
        cifs_small_buf_release(in_buf);
-       if (rc < 0)
-               goto out;
+       if (rc < 0) {
+               if (rc == -EAGAIN) {
+                       midQ->midState = MID_RETRY_NEEDED;
+                       goto outagain;
+               } else
+                       goto out;
+       }
        if (long_op == CIFS_STD_OP)
                timeout = 15 * HZ;
@@ -623,6 +629,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo
