From: Long Li Date: Wed, 15 May 2019 21:09:04 +0000 (-0700) Subject: cifs: Don't match port on SMBDirect transport X-Git-Tag: v5.2-rc1~6^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b249115719ba2cb56d3f92ee7492e033059d3f3;p=thirdparty%2Flinux.git cifs: Don't match port on SMBDirect transport SMBDirect manages its own ports in the transport layer, there is no need to check the port to find a connection. Signed-off-by: Long Li Signed-off-by: Steve French Reviewed-by: Ronnie sahlberg --- diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0b3ac8b76d188..8c4121da624e1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2446,6 +2446,10 @@ match_port(struct TCP_Server_Info *server, struct sockaddr *addr) { __be16 port, *sport; + /* SMBDirect manages its own ports, don't match it here */ + if (server->rdma) + return true; + switch (addr->sa_family) { case AF_INET: sport = &((struct sockaddr_in *) &server->dstaddr)->sin_port;