diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-08-22 14:57:42 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-08-24 22:32:55 -0400 |
commit | 16590a228109e2f318d2cc6466221134cfab723a (patch) | |
tree | 6fc50b56af011055e5988fd32f47d3b00c7b2576 | |
parent | 41963c10c47a35185e68cb9049f7a3493c94d2d7 (diff) |
SUNRPC: Silence WARN_ON when NFSv4.1 over RDMA is in use
Using NFSv4.1 on RDMA should be safe, so broaden the new checks in
rpc_create().
WARN_ON_ONCE is used, matching most other WARN call sites in clnt.c.
Fixes: 39a9beab5acb ("rpc: share one xps between all backchannels")
Fixes: d50039ea5ee6 ("nfsd4/rpc: move backchannel create logic...")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r-- | net/sunrpc/clnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7f79fb7dc6a0..66f23b376fa0 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -453,7 +453,7 @@ static struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | |||
453 | struct rpc_xprt_switch *xps; | 453 | struct rpc_xprt_switch *xps; |
454 | 454 | ||
455 | if (args->bc_xprt && args->bc_xprt->xpt_bc_xps) { | 455 | if (args->bc_xprt && args->bc_xprt->xpt_bc_xps) { |
456 | WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP); | 456 | WARN_ON_ONCE(!(args->protocol & XPRT_TRANSPORT_BC)); |
457 | xps = args->bc_xprt->xpt_bc_xps; | 457 | xps = args->bc_xprt->xpt_bc_xps; |
458 | xprt_switch_get(xps); | 458 | xprt_switch_get(xps); |
459 | } else { | 459 | } else { |
@@ -520,7 +520,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) | |||
520 | char servername[48]; | 520 | char servername[48]; |
521 | 521 | ||
522 | if (args->bc_xprt) { | 522 | if (args->bc_xprt) { |
523 | WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP); | 523 | WARN_ON_ONCE(!(args->protocol & XPRT_TRANSPORT_BC)); |
524 | xprt = args->bc_xprt->xpt_bc_xprt; | 524 | xprt = args->bc_xprt->xpt_bc_xprt; |
525 | if (xprt) { | 525 | if (xprt) { |
526 | xprt_get(xprt); | 526 | xprt_get(xprt); |