Skip to content
Snippets Groups Projects
Commit e1da82d0 authored by Long Li's avatar Long Li Committed by Greg Kroah-Hartman
Browse files

smbd: Make upper layer decide when to destroy the transport


[ Upstream commit 050b8c37 ]

On transport recoonect, upper layer CIFS code destroys the current
transport and then recoonect. This code path is not used by SMBD, in that
SMBD destroys its transport on RDMA disconnect notification independent of
CIFS upper layer behavior.

This approach adds some costs to SMBD layer to handle transport shutdown
and restart, and to deal with several racing conditions on reconnecting
transport.

Re-work this code path by introducing a new smbd_destroy. This function is
called form upper layer to ask SMBD to destroy the transport. SMBD will no
longer need to destroy the transport by itself while worrying about data
transfer is in progress. The upper layer guarantees the transport is
locked.

change log:
v2: fix build errors when CONFIG_CIFS_SMB_DIRECT is not configured

Signed-off-by: default avatarLong Li <longli@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Stable-dep-of: b7ab9161 ("cifs: Fix oops due to uncleared server->smbd_conn in reconnect")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d2d1ada5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment