diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-06-22 13:16:23 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:17 -0400 |
commit | cdf477068e6db0c3e19df96f46abb85202de138c (patch) | |
tree | 12381ecf664f91c62e2dedc72f57827347c5f5dd /net/sunrpc | |
parent | 6a19275ada9137435da58990c8f8d3f58e170bf1 (diff) |
[PATCH] RPC: Return -EPFNOSUPPORT for RPC programs that are unavailable
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9da1deb482e2..33f12b84e265 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -1021,10 +1021,11 @@ call_verify(struct rpc_task *task) | |||
1021 | case RPC_AUTH_ERROR: | 1021 | case RPC_AUTH_ERROR: |
1022 | break; | 1022 | break; |
1023 | case RPC_MISMATCH: | 1023 | case RPC_MISMATCH: |
1024 | printk(KERN_WARNING "%s: RPC call version mismatch!\n", __FUNCTION__); | 1024 | dprintk("%s: RPC call version mismatch!\n", __FUNCTION__); |
1025 | goto out_eio; | 1025 | error = -EPROTONOSUPPORT; |
1026 | goto out_err; | ||
1026 | default: | 1027 | default: |
1027 | printk(KERN_WARNING "%s: RPC call rejected, unknown error: %x\n", __FUNCTION__, n); | 1028 | dprintk("%s: RPC call rejected, unknown error: %x\n", __FUNCTION__, n); |
1028 | goto out_eio; | 1029 | goto out_eio; |
1029 | } | 1030 | } |
1030 | if (--len < 0) | 1031 | if (--len < 0) |
@@ -1075,23 +1076,26 @@ call_verify(struct rpc_task *task) | |||
1075 | case RPC_SUCCESS: | 1076 | case RPC_SUCCESS: |
1076 | return p; | 1077 | return p; |
1077 | case RPC_PROG_UNAVAIL: | 1078 | case RPC_PROG_UNAVAIL: |
1078 | printk(KERN_WARNING "RPC: call_verify: program %u is unsupported by server %s\n", | 1079 | dprintk("RPC: call_verify: program %u is unsupported by server %s\n", |
1079 | (unsigned int)task->tk_client->cl_prog, | 1080 | (unsigned int)task->tk_client->cl_prog, |
1080 | task->tk_client->cl_server); | 1081 | task->tk_client->cl_server); |
1081 | goto out_eio; | 1082 | error = -EPFNOSUPPORT; |
1083 | goto out_err; | ||
1082 | case RPC_PROG_MISMATCH: | 1084 | case RPC_PROG_MISMATCH: |
1083 | printk(KERN_WARNING "RPC: call_verify: program %u, version %u unsupported by server %s\n", | 1085 | dprintk("RPC: call_verify: program %u, version %u unsupported by server %s\n", |
1084 | (unsigned int)task->tk_client->cl_prog, | 1086 | (unsigned int)task->tk_client->cl_prog, |
1085 | (unsigned int)task->tk_client->cl_vers, | 1087 | (unsigned int)task->tk_client->cl_vers, |
1086 | task->tk_client->cl_server); | 1088 | task->tk_client->cl_server); |
1087 | goto out_eio; | 1089 | error = -EPROTONOSUPPORT; |
1090 | goto out_err; | ||
1088 | case RPC_PROC_UNAVAIL: | 1091 | case RPC_PROC_UNAVAIL: |
1089 | printk(KERN_WARNING "RPC: call_verify: proc %p unsupported by program %u, version %u on server %s\n", | 1092 | dprintk("RPC: call_verify: proc %p unsupported by program %u, version %u on server %s\n", |
1090 | task->tk_msg.rpc_proc, | 1093 | task->tk_msg.rpc_proc, |
1091 | task->tk_client->cl_prog, | 1094 | task->tk_client->cl_prog, |
1092 | task->tk_client->cl_vers, | 1095 | task->tk_client->cl_vers, |
1093 | task->tk_client->cl_server); | 1096 | task->tk_client->cl_server); |
1094 | goto out_eio; | 1097 | error = -EOPNOTSUPP; |
1098 | goto out_err; | ||
1095 | case RPC_GARBAGE_ARGS: | 1099 | case RPC_GARBAGE_ARGS: |
1096 | dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__); | 1100 | dprintk("RPC: %4d %s: server saw garbage\n", task->tk_pid, __FUNCTION__); |
1097 | break; /* retry */ | 1101 | break; /* retry */ |
@@ -1104,7 +1108,7 @@ out_retry: | |||
1104 | task->tk_client->cl_stats->rpcgarbage++; | 1108 | task->tk_client->cl_stats->rpcgarbage++; |
1105 | if (task->tk_garb_retry) { | 1109 | if (task->tk_garb_retry) { |
1106 | task->tk_garb_retry--; | 1110 | task->tk_garb_retry--; |
1107 | dprintk(KERN_WARNING "RPC %s: retrying %4d\n", __FUNCTION__, task->tk_pid); | 1111 | dprintk("RPC %s: retrying %4d\n", __FUNCTION__, task->tk_pid); |
1108 | task->tk_action = call_bind; | 1112 | task->tk_action = call_bind; |
1109 | return NULL; | 1113 | return NULL; |
1110 | } | 1114 | } |