diff options
| author | J. Bruce Fields <bfields@redhat.com> | 2012-08-15 18:07:43 -0400 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2012-09-10 10:55:19 -0400 |
| commit | eccf50c129686de11358093839749c83f6cae5db (patch) | |
| tree | 890b06b8dfb886e2326c101d6b8be70b7c330d96 /net | |
| parent | cf9182e90b2af04245ac4fae497fe73fc71285b4 (diff) | |
nfsd: remove unused listener-removal interfaces
You can use nfsd/portlist to give nfsd additional sockets to listen on.
In theory you can also remove listening sockets this way. But nobody's
ever done that as far as I can tell.
Also this was partially broken in 2.6.25, by
a217813f9067b785241cb7f31956e51d2071703a "knfsd: Support adding
transports by writing portlist file".
(Note that we decide whether to take the "delfd" case by checking for a
digit--but what's actually expected in that case is something made by
svc_one_sock_name(), which won't begin with a digit.)
So, let's just rip out this stuff.
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/sunrpc/svcsock.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 7aee54c3fe46..03827cef1fa7 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
| @@ -305,57 +305,6 @@ static int svc_one_sock_name(struct svc_sock *svsk, char *buf, int remaining) | |||
| 305 | return len; | 305 | return len; |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | /** | ||
| 309 | * svc_sock_names - construct a list of listener names in a string | ||
| 310 | * @serv: pointer to RPC service | ||
| 311 | * @buf: pointer to a buffer to fill in with socket names | ||
| 312 | * @buflen: size of the buffer to be filled | ||
| 313 | * @toclose: pointer to '\0'-terminated C string containing the name | ||
| 314 | * of a listener to be closed | ||
| 315 | * | ||
| 316 | * Fills in @buf with a '\n'-separated list of names of listener | ||
| 317 | * sockets. If @toclose is not NULL, the socket named by @toclose | ||
| 318 | * is closed, and is not included in the output list. | ||
| 319 | * | ||
| 320 | * Returns positive length of the socket name string, or a negative | ||
| 321 | * errno value on error. | ||
| 322 | */ | ||
| 323 | int svc_sock_names(struct svc_serv *serv, char *buf, const size_t buflen, | ||
| 324 | const char *toclose) | ||
| 325 | { | ||
| 326 | struct svc_sock *svsk, *closesk = NULL; | ||
| 327 | int len = 0; | ||
| 328 | |||
| 329 | if (!serv) | ||
| 330 | return 0; | ||
| 331 | |||
| 332 | spin_lock_bh(&serv->sv_lock); | ||
| 333 | list_for_each_entry(svsk, &serv->sv_permsocks, sk_xprt.xpt_list) { | ||
| 334 | int onelen = svc_one_sock_name(svsk, buf + len, buflen - len); | ||
| 335 | if (onelen < 0) { | ||
| 336 | len = onelen; | ||
| 337 | break; | ||
| 338 | } | ||
| 339 | if (toclose && strcmp(toclose, buf + len) == 0) { | ||
| 340 | closesk = svsk; | ||
| 341 | svc_xprt_get(&closesk->sk_xprt); | ||
| 342 | } else | ||
| 343 | len += onelen; | ||
| 344 | } | ||
| 345 | spin_unlock_bh(&serv->sv_lock); | ||
| 346 | |||
| 347 | if (closesk) { | ||
| 348 | /* Should unregister with portmap, but you cannot | ||
| 349 | * unregister just one protocol... | ||
| 350 | */ | ||
| 351 | svc_close_xprt(&closesk->sk_xprt); | ||
| 352 | svc_xprt_put(&closesk->sk_xprt); | ||
| 353 | } else if (toclose) | ||
| 354 | return -ENOENT; | ||
| 355 | return len; | ||
| 356 | } | ||
| 357 | EXPORT_SYMBOL_GPL(svc_sock_names); | ||
| 358 | |||
| 359 | /* | 308 | /* |
| 360 | * Check input queue length | 309 | * Check input queue length |
| 361 | */ | 310 | */ |
