From patchwork Tue Sep 21 15:14:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 197292 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8LFFKNi030025 for ; Tue, 21 Sep 2010 15:15:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757077Ab0IUPOn (ORCPT ); Tue, 21 Sep 2010 11:14:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36878 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757043Ab0IUPOm (ORCPT ); Tue, 21 Sep 2010 11:14:42 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8LFEeQA021313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 21 Sep 2010 11:14:41 -0400 Received: from corrin.poochiereds.net (ovpn-113-75.phx2.redhat.com [10.3.113.75]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8LFEe4P016445; Tue, 21 Sep 2010 11:14:40 -0400 From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org Subject: [PATCH] cifs: allow matching of tcp sessions in CifsNew state Date: Tue, 21 Sep 2010 08:14:46 -0700 Message-Id: <1285082086-15042-1-git-send-email-jlayton@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Sep 2010 15:15:20 +0000 (UTC) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 435b912..271038b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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;