Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: set socket send and receive timeouts before attempting connect
This commit is contained in:
Linus Torvalds 2011-07-03 11:12:21 -07:00
commit 070f944a0b
1 changed files with 8 additions and 8 deletions

View File

@ -2474,14 +2474,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
@ -2510,6 +2502,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);