Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cceead7 authored by Long Li's avatar Long Li Committed by Greg Kroah-Hartman
Browse files

cifs: smbd: Return -EAGAIN when transport is reconnecting



commit 4357d45f50e58672e1d17648d792f27df01dfccd upstream.

During reconnecting, the transport may have already been destroyed and is in
the process being reconnected. In this case, return -EAGAIN to not fail and
to retry this I/O.

Signed-off-by: default avatarLong Li <longli@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7438617d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -286,7 +286,10 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
	int val = 1;
	__be32 rfc1002_marker;

	if (cifs_rdma_enabled(server) && server->smbd_conn) {
	if (cifs_rdma_enabled(server)) {
		/* return -EAGAIN when connecting or reconnecting */
		rc = -EAGAIN;
		if (server->smbd_conn)
			rc = smbd_send(server, num_rqst, rqst);
		goto smbd_done;
	}