diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-01 20:04:20 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-12-01 20:04:20 -0500 |
| commit | 2db767d9889cef087149a5eaa35c1497671fa40f (patch) | |
| tree | 1d7dae11212066614b1fd1b3548f21eae9375250 | |
| parent | 788c1da05b73aee68ed98f05b577c308351f5619 (diff) | |
| parent | eb5b46faa693470681ec7c28cc2436edd1571198 (diff) | |
Merge tag 'nfs-for-4.15-2' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client fixes from Anna Schumaker:
"These patches fix a problem with compiling using an old version of
gcc, and also fix up error handling in the SUNRPC layer.
- NFSv4: Ensure gcc 4.4.4 can compile initialiser for
"invalid_stateid"
- SUNRPC: Allow connect to return EHOSTUNREACH
- SUNRPC: Handle ENETDOWN errors"
* tag 'nfs-for-4.15-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
SUNRPC: Handle ENETDOWN errors
SUNRPC: Allow connect to return EHOSTUNREACH
NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid"
| -rw-r--r-- | fs/nfs/nfs4state.c | 4 | ||||
| -rw-r--r-- | net/sunrpc/clnt.c | 5 | ||||
| -rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 54fd56d715a8..e4f4a09ed9f4 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
| @@ -71,8 +71,8 @@ const nfs4_stateid zero_stateid = { | |||
| 71 | }; | 71 | }; |
| 72 | const nfs4_stateid invalid_stateid = { | 72 | const nfs4_stateid invalid_stateid = { |
| 73 | { | 73 | { |
| 74 | .seqid = cpu_to_be32(0xffffffffU), | 74 | /* Funky initialiser keeps older gcc versions happy */ |
| 75 | .other = { 0 }, | 75 | .data = { 0xff, 0xff, 0xff, 0xff, 0 }, |
| 76 | }, | 76 | }, |
| 77 | .type = NFS4_INVALID_STATEID_TYPE, | 77 | .type = NFS4_INVALID_STATEID_TYPE, |
| 78 | }; | 78 | }; |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index a801da812f86..e2a4184f3c5d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
| @@ -1841,6 +1841,7 @@ call_bind_status(struct rpc_task *task) | |||
| 1841 | case -ECONNABORTED: | 1841 | case -ECONNABORTED: |
| 1842 | case -ENOTCONN: | 1842 | case -ENOTCONN: |
| 1843 | case -EHOSTDOWN: | 1843 | case -EHOSTDOWN: |
| 1844 | case -ENETDOWN: | ||
| 1844 | case -EHOSTUNREACH: | 1845 | case -EHOSTUNREACH: |
| 1845 | case -ENETUNREACH: | 1846 | case -ENETUNREACH: |
| 1846 | case -ENOBUFS: | 1847 | case -ENOBUFS: |
| @@ -1917,6 +1918,7 @@ call_connect_status(struct rpc_task *task) | |||
| 1917 | /* fall through */ | 1918 | /* fall through */ |
| 1918 | case -ECONNRESET: | 1919 | case -ECONNRESET: |
| 1919 | case -ECONNABORTED: | 1920 | case -ECONNABORTED: |
| 1921 | case -ENETDOWN: | ||
| 1920 | case -ENETUNREACH: | 1922 | case -ENETUNREACH: |
| 1921 | case -EHOSTUNREACH: | 1923 | case -EHOSTUNREACH: |
| 1922 | case -EADDRINUSE: | 1924 | case -EADDRINUSE: |
| @@ -2022,6 +2024,7 @@ call_transmit_status(struct rpc_task *task) | |||
| 2022 | */ | 2024 | */ |
| 2023 | case -ECONNREFUSED: | 2025 | case -ECONNREFUSED: |
| 2024 | case -EHOSTDOWN: | 2026 | case -EHOSTDOWN: |
| 2027 | case -ENETDOWN: | ||
| 2025 | case -EHOSTUNREACH: | 2028 | case -EHOSTUNREACH: |
| 2026 | case -ENETUNREACH: | 2029 | case -ENETUNREACH: |
| 2027 | case -EPERM: | 2030 | case -EPERM: |
| @@ -2071,6 +2074,7 @@ call_bc_transmit(struct rpc_task *task) | |||
| 2071 | switch (task->tk_status) { | 2074 | switch (task->tk_status) { |
| 2072 | case 0: | 2075 | case 0: |
| 2073 | /* Success */ | 2076 | /* Success */ |
| 2077 | case -ENETDOWN: | ||
| 2074 | case -EHOSTDOWN: | 2078 | case -EHOSTDOWN: |
| 2075 | case -EHOSTUNREACH: | 2079 | case -EHOSTUNREACH: |
| 2076 | case -ENETUNREACH: | 2080 | case -ENETUNREACH: |
| @@ -2139,6 +2143,7 @@ call_status(struct rpc_task *task) | |||
| 2139 | task->tk_status = 0; | 2143 | task->tk_status = 0; |
| 2140 | switch(status) { | 2144 | switch(status) { |
| 2141 | case -EHOSTDOWN: | 2145 | case -EHOSTDOWN: |
| 2146 | case -ENETDOWN: | ||
| 2142 | case -EHOSTUNREACH: | 2147 | case -EHOSTUNREACH: |
| 2143 | case -ENETUNREACH: | 2148 | case -ENETUNREACH: |
| 2144 | case -EPERM: | 2149 | case -EPERM: |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 9cc850c2719e..6d0cc3b8f932 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
| @@ -2440,7 +2440,9 @@ static void xs_tcp_setup_socket(struct work_struct *work) | |||
| 2440 | */ | 2440 | */ |
| 2441 | case -ECONNREFUSED: | 2441 | case -ECONNREFUSED: |
| 2442 | case -ECONNRESET: | 2442 | case -ECONNRESET: |
| 2443 | case -ENETDOWN: | ||
| 2443 | case -ENETUNREACH: | 2444 | case -ENETUNREACH: |
| 2445 | case -EHOSTUNREACH: | ||
| 2444 | case -EADDRINUSE: | 2446 | case -EADDRINUSE: |
| 2445 | case -ENOBUFS: | 2447 | case -ENOBUFS: |
| 2446 | /* | 2448 | /* |
