diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-04-29 00:13:32 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2020-05-18 17:21:22 +0300 |
commit | 4b8f380e46e4d3f8e9f6f9545fe2b78b872b6070 (patch) | |
tree | 33967349e8240bb70001b70ca2dbcc0c65d51c4e /net/sunrpc/svc_xprt.c | |
parent | e3e67621e307920c338393d9a33ccb902354ca31 (diff) | |
download | linux-4b8f380e46e4d3f8e9f6f9545fe2b78b872b6070.tar.xz |
SUNRPC: Tracepoint to record errors in svc_xpo_create()
Capture transport creation failures.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 07cdbf7d5764..f89e04210a48 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -206,6 +206,7 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl, .sin6_port = htons(port), }; #endif + struct svc_xprt *xprt; struct sockaddr *sap; size_t len; @@ -224,7 +225,11 @@ static struct svc_xprt *__svc_xpo_create(struct svc_xprt_class *xcl, return ERR_PTR(-EAFNOSUPPORT); } - return xcl->xcl_ops->xpo_create(serv, net, sap, len, flags); + xprt = xcl->xcl_ops->xpo_create(serv, net, sap, len, flags); + if (IS_ERR(xprt)) + trace_svc_xprt_create_err(serv->sv_program->pg_name, + xcl->xcl_name, sap, xprt); + return xprt; } /* |