diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-03 11:12:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-03 11:12:21 -0700 |
commit | 070f944a0bb9dd27772fa232bd7648ccc5780548 (patch) | |
tree | 9efa45dff3e8d61e2c8ab7c6caa3bc53cfe44b8e | |
parent | b775c389252886b64f037a655934fa1df7c03006 (diff) | |
parent | ee1b3ea9e6171d7a842527a44873f9f51e6f239b (diff) | |
download | linux-070f944a0bb9dd27772fa232bd7648ccc5780548.tar.bz2 |
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
-rw-r--r-- | fs/cifs/connect.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 7f540df52527..c8cb83ef6f6f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -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); |