Skip to content

Commit 2db767d

Browse files
committed
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"
2 parents 788c1da + eb5b46f commit 2db767d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

fs/nfs/nfs4state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const nfs4_stateid zero_stateid = {
7171
};
7272
const nfs4_stateid invalid_stateid = {
7373
{
74-
.seqid = cpu_to_be32(0xffffffffU),
75-
.other = { 0 },
74+
/* Funky initialiser keeps older gcc versions happy */
75+
.data = { 0xff, 0xff, 0xff, 0xff, 0 },
7676
},
7777
.type = NFS4_INVALID_STATEID_TYPE,
7878
};

net/sunrpc/clnt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,7 @@ call_bind_status(struct rpc_task *task)
18411841
case -ECONNABORTED:
18421842
case -ENOTCONN:
18431843
case -EHOSTDOWN:
1844+
case -ENETDOWN:
18441845
case -EHOSTUNREACH:
18451846
case -ENETUNREACH:
18461847
case -ENOBUFS:
@@ -1917,6 +1918,7 @@ call_connect_status(struct rpc_task *task)
19171918
/* fall through */
19181919
case -ECONNRESET:
19191920
case -ECONNABORTED:
1921+
case -ENETDOWN:
19201922
case -ENETUNREACH:
19211923
case -EHOSTUNREACH:
19221924
case -EADDRINUSE:
@@ -2022,6 +2024,7 @@ call_transmit_status(struct rpc_task *task)
20222024
*/
20232025
case -ECONNREFUSED:
20242026
case -EHOSTDOWN:
2027+
case -ENETDOWN:
20252028
case -EHOSTUNREACH:
20262029
case -ENETUNREACH:
20272030
case -EPERM:
@@ -2071,6 +2074,7 @@ call_bc_transmit(struct rpc_task *task)
20712074
switch (task->tk_status) {
20722075
case 0:
20732076
/* Success */
2077+
case -ENETDOWN:
20742078
case -EHOSTDOWN:
20752079
case -EHOSTUNREACH:
20762080
case -ENETUNREACH:
@@ -2139,6 +2143,7 @@ call_status(struct rpc_task *task)
21392143
task->tk_status = 0;
21402144
switch(status) {
21412145
case -EHOSTDOWN:
2146+
case -ENETDOWN:
21422147
case -EHOSTUNREACH:
21432148
case -ENETUNREACH:
21442149
case -EPERM:

net/sunrpc/xprtsock.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,7 +2440,9 @@ static void xs_tcp_setup_socket(struct work_struct *work)
24402440
*/
24412441
case -ECONNREFUSED:
24422442
case -ECONNRESET:
2443+
case -ENETDOWN:
24432444
case -ENETUNREACH:
2445+
case -EHOSTUNREACH:
24442446
case -EADDRINUSE:
24452447
case -ENOBUFS:
24462448
/*

0 commit comments

Comments
 (0)