Commit 56b29296 authored by Pavel Shilovsky's avatar Pavel Shilovsky

Delete redundant code for 2.6.27

parent 3e5db3af
...@@ -1649,15 +1649,13 @@ ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket, ...@@ -1649,15 +1649,13 @@ ipv4_connect(struct sockaddr_in *psin_server, struct socket **csocket,
} }
if (!orig_port_error && !connected) { if (!orig_port_error && !connected) {
if (psin_server->sin_port != htons(CIFS_PORT)) { psin_server->sin_port = htons(CIFS_PORT);
psin_server->sin_port = htons(CIFS_PORT);
rc = (*csocket)->ops->connect(*csocket,
rc = (*csocket)->ops->connect(*csocket, (struct sockaddr *) psin_server,
(struct sockaddr *) psin_server, sizeof(struct sockaddr_in), 0);
sizeof(struct sockaddr_in), 0); if (rc >= 0)
if (rc >= 0) connected = 1;
connected = 1;
}
} }
if (!orig_port_error && !connected) { if (!orig_port_error && !connected) {
...@@ -1784,16 +1782,13 @@ ipv6_connect(struct sockaddr_in6 *psin_server, struct socket **csocket, ...@@ -1784,16 +1782,13 @@ ipv6_connect(struct sockaddr_in6 *psin_server, struct socket **csocket,
} }
if (!orig_port_error && !connected) { if (!orig_port_error && !connected) {
/* do not retry on the same port we just failed on */ psin_server->sin6_port = htons(CIFS_PORT);
if (psin_server->sin6_port != htons(CIFS_PORT)) {
psin_server->sin6_port = htons(CIFS_PORT); rc = (*csocket)->ops->connect(*csocket,
(struct sockaddr *) psin_server,
rc = (*csocket)->ops->connect(*csocket, sizeof(struct sockaddr_in6), 0);
(struct sockaddr *) psin_server, if (rc >= 0)
sizeof(struct sockaddr_in6), 0); connected = 1;
if (rc >= 0)
connected = 1;
}
} }
if (!orig_port_error && !connected) { if (!orig_port_error && !connected) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment