Commit 0fdea1e
committed
SUNRPC: Ensure that we wait for connections to complete before retrying
Commit 718ba5b, moved the responsibility for unlocking the socket to
xs_tcp_setup_socket, meaning that the socket will be unlocked before we
know that it has finished trying to connect. The following patch is based on
an initial patch by Russell King to ensure that we delay clearing the
XPRT_CONNECTING flag until we either know that we failed to initiate
a connection attempt, or the connection attempt itself failed.
Fixes: 718ba5b ("SUNRPC: Add helpers to prevent socket create from racing")
Reported-by: Russell King <linux@arm.linux.org.uk>
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>1 parent 17a9618 commit 0fdea1e
2 files changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1438 | 1438 | | |
1439 | 1439 | | |
1440 | 1440 | | |
| 1441 | + | |
1441 | 1442 | | |
1442 | 1443 | | |
1443 | 1444 | | |
| |||
1449 | 1450 | | |
1450 | 1451 | | |
1451 | 1452 | | |
| 1453 | + | |
1452 | 1454 | | |
1453 | 1455 | | |
1454 | 1456 | | |
1455 | 1457 | | |
1456 | 1458 | | |
1457 | | - | |
1458 | | - | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
| |||
1464 | 1464 | | |
1465 | 1465 | | |
1466 | 1466 | | |
| 1467 | + | |
| 1468 | + | |
1467 | 1469 | | |
1468 | 1470 | | |
1469 | 1471 | | |
| |||
1499 | 1501 | | |
1500 | 1502 | | |
1501 | 1503 | | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1502 | 1507 | | |
1503 | 1508 | | |
1504 | 1509 | | |
| |||
2182 | 2187 | | |
2183 | 2188 | | |
2184 | 2189 | | |
| 2190 | + | |
2185 | 2191 | | |
2186 | 2192 | | |
2187 | 2193 | | |
| |||
2243 | 2249 | | |
2244 | 2250 | | |
2245 | 2251 | | |
2246 | | - | |
2247 | 2252 | | |
2248 | 2253 | | |
2249 | 2254 | | |
| |||
0 commit comments