diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-08-22 14:57:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-07 15:21:25 +0200 |
commit | 8374aee399534e17955b7a468895beed5f87ba73 (patch) | |
tree | 2dd9f0c6aadb74a91d781e0baa31242f83c33402 /net | |
parent | d926cd9f7b907f6ae3fc2c49684f51da3c8f2f72 (diff) | |
download | linux-stable-8374aee399534e17955b7a468895beed5f87ba73.tar.gz linux-stable-8374aee399534e17955b7a468895beed5f87ba73.tar.bz2 linux-stable-8374aee399534e17955b7a468895beed5f87ba73.zip |
SUNRPC: Silence WARN_ON when NFSv4.1 over RDMA is in use
commit 16590a228109e2f318d2cc6466221134cfab723a upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-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 2808d550d273..0294ada6bc40 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, struct rpc_xprt_switch *xps; if (args->bc_xprt && args->bc_xprt->xpt_bc_xps) { - WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP); + WARN_ON_ONCE(!(args->protocol & XPRT_TRANSPORT_BC)); xps = args->bc_xprt->xpt_bc_xps; xprt_switch_get(xps); } else { @@ -520,7 +520,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) char servername[48]; if (args->bc_xprt) { - WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP); + WARN_ON_ONCE(!(args->protocol & XPRT_TRANSPORT_BC)); xprt = args->bc_xprt->xpt_bc_xprt; if (xprt) { xprt_get(xprt); |