diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index d265aa700bb3..7bd3bbba4710 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -331,19 +331,21 @@ int svc_sock_names(struct svc_serv *serv, char *buf, const size_t buflen, | |||
331 | len = onelen; | 331 | len = onelen; |
332 | break; | 332 | break; |
333 | } | 333 | } |
334 | if (toclose && strcmp(toclose, buf + len) == 0) | 334 | if (toclose && strcmp(toclose, buf + len) == 0) { |
335 | closesk = svsk; | 335 | closesk = svsk; |
336 | else | 336 | svc_xprt_get(&closesk->sk_xprt); |
337 | } else | ||
337 | len += onelen; | 338 | len += onelen; |
338 | } | 339 | } |
339 | spin_unlock_bh(&serv->sv_lock); | 340 | spin_unlock_bh(&serv->sv_lock); |
340 | 341 | ||
341 | if (closesk) | 342 | if (closesk) { |
342 | /* Should unregister with portmap, but you cannot | 343 | /* Should unregister with portmap, but you cannot |
343 | * unregister just one protocol... | 344 | * unregister just one protocol... |
344 | */ | 345 | */ |
345 | svc_close_xprt(&closesk->sk_xprt); | 346 | svc_close_xprt(&closesk->sk_xprt); |
346 | else if (toclose) | 347 | svc_xprt_put(&closesk->sk_xprt); |
348 | } else if (toclose) | ||
347 | return -ENOENT; | 349 | return -ENOENT; |
348 | return len; | 350 | return len; |
349 | } | 351 | } |
@@ -992,15 +994,17 @@ static int svc_process_calldir(struct svc_sock *svsk, struct svc_rqst *rqstp, | |||
992 | vec[0] = rqstp->rq_arg.head[0]; | 994 | vec[0] = rqstp->rq_arg.head[0]; |
993 | } else { | 995 | } else { |
994 | /* REPLY */ | 996 | /* REPLY */ |
995 | if (svsk->sk_bc_xprt) | 997 | struct rpc_xprt *bc_xprt = svsk->sk_xprt.xpt_bc_xprt; |
996 | req = xprt_lookup_rqst(svsk->sk_bc_xprt, xid); | 998 | |
999 | if (bc_xprt) | ||
1000 | req = xprt_lookup_rqst(bc_xprt, xid); | ||
997 | 1001 | ||
998 | if (!req) { | 1002 | if (!req) { |
999 | printk(KERN_NOTICE | 1003 | printk(KERN_NOTICE |
1000 | "%s: Got unrecognized reply: " | 1004 | "%s: Got unrecognized reply: " |
1001 | "calldir 0x%x sk_bc_xprt %p xid %08x\n", | 1005 | "calldir 0x%x xpt_bc_xprt %p xid %08x\n", |
1002 | __func__, ntohl(calldir), | 1006 | __func__, ntohl(calldir), |
1003 | svsk->sk_bc_xprt, xid); | 1007 | bc_xprt, xid); |
1004 | vec[0] = rqstp->rq_arg.head[0]; | 1008 | vec[0] = rqstp->rq_arg.head[0]; |
1005 | goto out; | 1009 | goto out; |
1006 | } | 1010 | } |