mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
smb: smbdirect: introduce smbdirect_connection_is_connected()
This is a simple way to check is the connection is still ok without the need to know internals of struct smbdirect_socket. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: 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> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
09d617d312
commit
dc24063813
|
|
@ -703,6 +703,14 @@ static void smbdirect_connection_negotiate_rdma_resources(struct smbdirect_socke
|
|||
peer_responder_resources);
|
||||
}
|
||||
|
||||
__maybe_unused /* this is temporary while this file is included in others */
|
||||
static bool smbdirect_connection_is_connected(struct smbdirect_socket *sc)
|
||||
{
|
||||
if (unlikely(!sc || sc->first_error || sc->status != SMBDIRECT_SOCKET_CONNECTED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
__maybe_unused /* this is temporary while this file is included in others */
|
||||
static int smbdirect_connection_wait_for_connected(struct smbdirect_socket *sc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user