Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: set socket send and receive timeouts before attempting connect
  • Loading branch information
Linus Torvalds committed Jul 3, 2011
2 parents b775c38 + ee1b3ea commit 070f944
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 070f944

Please sign in to comment.