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

Commit ab9db8b7 authored by Jeff Layton's avatar Jeff Layton Committed by Steve French
Browse files

cifs: allow matching of tcp sessions in CifsNew state



With commit 7332f2a6, cifsd will no
longer exit when the socket abends and the tcpStatus is CifsNew. With
that change, there's no reason to avoid matching an existing session in
this state.

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 5fe97cfd
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1511,15 +1511,6 @@ cifs_find_tcp_session(struct sockaddr *addr, struct smb_vol *vol)

	write_lock(&cifs_tcp_ses_lock);
	list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
		/*
		 * the demux thread can exit on its own while still in CifsNew
		 * so don't accept any sockets in that state. Since the
		 * tcpStatus never changes back to CifsNew it's safe to check
		 * for this without a lock.
		 */
		if (server->tcpStatus == CifsNew)
			continue;

		if (!match_address(server, addr,
				   (struct sockaddr *)&vol->srcaddr))
			continue;