aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 0ef4dd4414ec..ee091c869fcd 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2359,6 +2359,15 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args)
2359 struct svc_sock *bc_sock; 2359 struct svc_sock *bc_sock;
2360 struct rpc_xprt *ret; 2360 struct rpc_xprt *ret;
2361 2361
2362 if (args->bc_xprt->xpt_bc_xprt) {
2363 /*
2364 * This server connection already has a backchannel
2365 * export; we can't create a new one, as we wouldn't be
2366 * able to match replies based on xid any more. So,
2367 * reuse the already-existing one:
2368 */
2369 return args->bc_xprt->xpt_bc_xprt;
2370 }
2362 xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries); 2371 xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries);
2363 if (IS_ERR(xprt)) 2372 if (IS_ERR(xprt))
2364 return xprt; 2373 return xprt;
@@ -2397,15 +2406,6 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args)
2397 xprt->address_strings[RPC_DISPLAY_PROTO]); 2406 xprt->address_strings[RPC_DISPLAY_PROTO]);
2398 2407
2399 /* 2408 /*
2400 * The backchannel uses the same socket connection as the
2401 * forechannel
2402 */
2403 if (args->bc_xprt->xpt_bc_xprt) {
2404 /* XXX: actually, want to catch this case... */
2405 ret = ERR_PTR(-EINVAL);
2406 goto out_err;
2407 }
2408 /*
2409 * Once we've associated a backchannel xprt with a connection, 2409 * Once we've associated a backchannel xprt with a connection,
2410 * we want to keep it around as long as long as the connection 2410 * we want to keep it around as long as long as the connection
2411 * lasts, in case we need to start using it for a backchannel 2411 * lasts, in case we need to start using it for a backchannel