cifs: allow matching of tcp sessions in CifsNew state
authorJeff Layton <jlayton@redhat.com>
Tue, 21 Sep 2010 15:14:46 +0000 (08:14 -0700)
committerSteve French <sfrench@us.ibm.com>
Wed, 29 Sep 2010 19:04:31 +0000 (19:04 +0000)
With commit 7332f2a6217ee6925f83ef0e725013067ed316ba, 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: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c

index 435b912f5de5b7de04305a9c9f99ab940d2aa206..271038b6ec0e057de721fc5d9d9123f81531bb10 100644 (file)
@@ -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;