From patchwork Thu Jan 13 19:01:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 476581 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 p0DJ5ZZI004682 for ; Thu, 13 Jan 2011 19:05:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757385Ab1AMTBc (ORCPT ); Thu, 13 Jan 2011 14:01:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42385 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756863Ab1AMTBR (ORCPT ); Thu, 13 Jan 2011 14:01:17 -0500 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 p0DJ1ESX000888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 13 Jan 2011 14:01:15 -0500 Received: from barsoom.rdu.redhat.com (barsoom.rdu.redhat.com [10.11.228.36]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p0DJ1D1O024274; Thu, 13 Jan 2011 14:01:14 -0500 Date: Thu, 13 Jan 2011 14:01:10 -0500 From: Jeff Layton To: "Benjamin S." Cc: linux-cifs@vger.kernel.org Subject: Re: Suspend failed - unable to freeze cifsd Message-ID: <20110113140110.26a33f2f@barsoom.rdu.redhat.com> In-Reply-To: <20110112114904.34efd9d1@tlielax.poochiereds.net> References: <20110112103422.53368ef0@pluto-lenny.milky.way> <20110112114904.34efd9d1@tlielax.poochiereds.net> Mime-Version: 1.0 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 13 Jan 2011 19:05:36 +0000 (UTC) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 99a5f18..32c2f55 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2290,14 +2290,6 @@ generic_ip_connect(struct TCP_Server_Info *server) if (rc < 0) return rc; - rc = socket->ops->connect(socket, saddr, slen, 0); - if (rc < 0) { - cFYI(1, "Error %d connecting to server", rc); - sock_release(socket); - server->ssocket = NULL; - return rc; - } - /* * Eventually check for other socket options to change from * the default. sock_setsockopt not used because it expects @@ -2326,6 +2318,14 @@ generic_ip_connect(struct TCP_Server_Info *server) socket->sk->sk_sndbuf, socket->sk->sk_rcvbuf, socket->sk->sk_rcvtimeo); + rc = socket->ops->connect(socket, saddr, slen, 0); + if (rc < 0) { + cFYI(1, "Error %d connecting to server", rc); + sock_release(socket); + server->ssocket = NULL; + return rc; + } + if (sport == htons(RFC1001_PORT)) rc = ip_rfc1001_connect(server);