diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /net/sunrpc/clnt.c | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 06b4df9faaa1..2808d550d273 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -446,16 +446,27 @@ out_no_rpciod: | |||
446 | return ERR_PTR(err); | 446 | return ERR_PTR(err); |
447 | } | 447 | } |
448 | 448 | ||
449 | struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | 449 | static struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, |
450 | struct rpc_xprt *xprt) | 450 | struct rpc_xprt *xprt) |
451 | { | 451 | { |
452 | struct rpc_clnt *clnt = NULL; | 452 | struct rpc_clnt *clnt = NULL; |
453 | struct rpc_xprt_switch *xps; | 453 | struct rpc_xprt_switch *xps; |
454 | 454 | ||
455 | xps = xprt_switch_alloc(xprt, GFP_KERNEL); | 455 | if (args->bc_xprt && args->bc_xprt->xpt_bc_xps) { |
456 | if (xps == NULL) | 456 | WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP); |
457 | return ERR_PTR(-ENOMEM); | 457 | xps = args->bc_xprt->xpt_bc_xps; |
458 | 458 | xprt_switch_get(xps); | |
459 | } else { | ||
460 | xps = xprt_switch_alloc(xprt, GFP_KERNEL); | ||
461 | if (xps == NULL) { | ||
462 | xprt_put(xprt); | ||
463 | return ERR_PTR(-ENOMEM); | ||
464 | } | ||
465 | if (xprt->bc_xprt) { | ||
466 | xprt_switch_get(xps); | ||
467 | xprt->bc_xprt->xpt_bc_xps = xps; | ||
468 | } | ||
469 | } | ||
459 | clnt = rpc_new_client(args, xps, xprt, NULL); | 470 | clnt = rpc_new_client(args, xps, xprt, NULL); |
460 | if (IS_ERR(clnt)) | 471 | if (IS_ERR(clnt)) |
461 | return clnt; | 472 | return clnt; |
@@ -483,7 +494,6 @@ struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | |||
483 | 494 | ||
484 | return clnt; | 495 | return clnt; |
485 | } | 496 | } |
486 | EXPORT_SYMBOL_GPL(rpc_create_xprt); | ||
487 | 497 | ||
488 | /** | 498 | /** |
489 | * rpc_create - create an RPC client and transport with one call | 499 | * rpc_create - create an RPC client and transport with one call |
@@ -509,6 +519,15 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) | |||
509 | }; | 519 | }; |
510 | char servername[48]; | 520 | char servername[48]; |
511 | 521 | ||
522 | if (args->bc_xprt) { | ||
523 | WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP); | ||
524 | xprt = args->bc_xprt->xpt_bc_xprt; | ||
525 | if (xprt) { | ||
526 | xprt_get(xprt); | ||
527 | return rpc_create_xprt(args, xprt); | ||
528 | } | ||
529 | } | ||
530 | |||
512 | if (args->flags & RPC_CLNT_CREATE_INFINITE_SLOTS) | 531 | if (args->flags & RPC_CLNT_CREATE_INFINITE_SLOTS) |
513 | xprtargs.flags |= XPRT_CREATE_INFINITE_SLOTS; | 532 | xprtargs.flags |= XPRT_CREATE_INFINITE_SLOTS; |
514 | if (args->flags & RPC_CLNT_CREATE_NO_IDLE_TIMEOUT) | 533 | if (args->flags & RPC_CLNT_CREATE_NO_IDLE_TIMEOUT) |