From: Chuck Lever <chuck.lever@oracle.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 1/3] SUNRPC: Don't use EPROTONOSUPPORT in svc_register()
Date: Tue, 13 Jan 2009 12:31:41 -0500 [thread overview]
Message-ID: <20090113173141.6755.16134.stgit@ingres.1015granger.net> (raw)
In-Reply-To: <20090113172538.6755.83766.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
The RPC client returns EPROTONOSUPPORT if there is a protocol version
mismatch (ie the server doesn't support the RPC protocol version sent
by the client).
Since svc_register uses the RPC client, it's confusing when
svc_register's helpers return this errno for a problem not related to
a program number mismatch.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
net/sunrpc/svc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index c51fed4..a278a82 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -750,7 +750,7 @@ static int __svc_rpcb_register4(const u32 program, const u32 version,
netid = RPCBIND_NETID_TCP;
break;
default:
- return -EPROTONOSUPPORT;
+ return -ENOPROTOOPT;
}
return rpcb_v4_register(program, version,
@@ -786,7 +786,7 @@ static int __svc_rpcb_register6(const u32 program, const u32 version,
netid = RPCBIND_NETID_TCP6;
break;
default:
- return -EPROTONOSUPPORT;
+ return -ENOPROTOOPT;
}
return rpcb_v4_register(program, version,
next prev parent reply other threads:[~2009-01-13 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 17:31 [PATCH 0/3] Detect user space support for rpcbind v4 Chuck Lever
[not found] ` <20090113172538.6755.83766.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-01-13 17:31 ` Chuck Lever [this message]
2009-01-13 17:31 ` [PATCH 2/3] SUNRPC: Clearer error message when user space is running portmap Chuck Lever
2009-01-13 17:31 ` [PATCH 3/3] " Chuck Lever
[not found] ` <20090113173156.6755.86231.stgit-07a7zB5ZJzbwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org>
2009-01-13 17:44 ` Trond Myklebust
[not found] ` <1231868640.7036.11.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-01-13 18:26 ` Chuck Lever
2009-01-13 23:13 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090113173141.6755.16134.stgit@ingres.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox