diff options
| author | Stefan Metzmacher <metze@samba.org> | 2025-08-28 10:39:56 +0200 |
|---|---|---|
| committer | Steve French <stfrench@microsoft.com> | 2025-09-28 18:29:48 -0500 |
| commit | cc678b8a89291ef55c8dfc01391506f1234c6cae (patch) | |
| tree | 12b553596593ce24ebe6d3534e323340f45737e8 | |
| parent | 58dfba8a2d4eb6defc6e710196b053abdaf6cd79 (diff) | |
| download | linux-cc678b8a89291ef55c8dfc01391506f1234c6cae.tar.gz linux-cc678b8a89291ef55c8dfc01391506f1234c6cae.zip | |
smb: client/smbdirect: introduce SMBDIRECT_SOCKET_ERROR
This will be used to turn SMBDIRECT_SOCKET_CONNECTED into an
error within smbd_disconnect_rdma_connection() on the client
and smb_direct_disconnect_rdma_connection() on the server.
We do this in a single commit with the client as otherwise it
won't build because the enum value is not handled in the
switch statement.
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
| -rw-r--r-- | fs/smb/client/smbdirect.c | 1 | ||||
| -rw-r--r-- | fs/smb/common/smbdirect/smbdirect_socket.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index e4abc1a9564a..09f8b12dd4f1 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -166,6 +166,7 @@ static void smbd_disconnect_rdma_work(struct work_struct *work) case SMBDIRECT_SOCKET_NEGOTIATE_RUNNING: case SMBDIRECT_SOCKET_NEGOTIATE_FAILED: case SMBDIRECT_SOCKET_CONNECTED: + case SMBDIRECT_SOCKET_ERROR: sc->status = SMBDIRECT_SOCKET_DISCONNECTING; rdma_disconnect(sc->rdma.cm_id); break; diff --git a/fs/smb/common/smbdirect/smbdirect_socket.h b/fs/smb/common/smbdirect/smbdirect_socket.h index ced8c9f20cf5..5e25abc02364 100644 --- a/fs/smb/common/smbdirect/smbdirect_socket.h +++ b/fs/smb/common/smbdirect/smbdirect_socket.h @@ -23,6 +23,7 @@ enum smbdirect_socket_status { SMBDIRECT_SOCKET_NEGOTIATE_RUNNING, SMBDIRECT_SOCKET_NEGOTIATE_FAILED, SMBDIRECT_SOCKET_CONNECTED, + SMBDIRECT_SOCKET_ERROR, SMBDIRECT_SOCKET_DISCONNECTING, SMBDIRECT_SOCKET_DISCONNECTED, SMBDIRECT_SOCKET_DESTROYED @@ -60,6 +61,8 @@ const char *smbdirect_socket_status_string(enum smbdirect_socket_status status) return "NEGOTIATE_FAILED"; case SMBDIRECT_SOCKET_CONNECTED: return "CONNECTED"; + case SMBDIRECT_SOCKET_ERROR: + return "ERROR"; case SMBDIRECT_SOCKET_DISCONNECTING: return "DISCONNECTING"; case SMBDIRECT_SOCKET_DISCONNECTED: |
