Skip to content

Commit 16590a2

Browse files
chucklevertrondmypd
authored andcommitted
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: 39a9bea ("rpc: share one xps between all backchannels") Fixes: d50039e ("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>
1 parent 41963c1 commit 16590a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/clnt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
453453
struct rpc_xprt_switch *xps;
454454

455455
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));
457457
xps = args->bc_xprt->xpt_bc_xps;
458458
xprt_switch_get(xps);
459459
} else {
@@ -520,7 +520,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
520520
char servername[48];
521521

522522
if (args->bc_xprt) {
523-
WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP);
523+
WARN_ON_ONCE(!(args->protocol & XPRT_TRANSPORT_BC));
524524
xprt = args->bc_xprt->xpt_bc_xprt;
525525
if (xprt) {
526526
xprt_get(xprt);

0 commit comments

Comments
 (0)