diff options
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d7a369e61085..dcc446e7fbf6 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -1197,6 +1197,21 @@ size_t rpc_max_payload(struct rpc_clnt *clnt) | |||
1197 | EXPORT_SYMBOL_GPL(rpc_max_payload); | 1197 | EXPORT_SYMBOL_GPL(rpc_max_payload); |
1198 | 1198 | ||
1199 | /** | 1199 | /** |
1200 | * rpc_get_timeout - Get timeout for transport in units of HZ | ||
1201 | * @clnt: RPC client to query | ||
1202 | */ | ||
1203 | unsigned long rpc_get_timeout(struct rpc_clnt *clnt) | ||
1204 | { | ||
1205 | unsigned long ret; | ||
1206 | |||
1207 | rcu_read_lock(); | ||
1208 | ret = rcu_dereference(clnt->cl_xprt)->timeout->to_initval; | ||
1209 | rcu_read_unlock(); | ||
1210 | return ret; | ||
1211 | } | ||
1212 | EXPORT_SYMBOL_GPL(rpc_get_timeout); | ||
1213 | |||
1214 | /** | ||
1200 | * rpc_force_rebind - force transport to check that remote port is unchanged | 1215 | * rpc_force_rebind - force transport to check that remote port is unchanged |
1201 | * @clnt: client to rebind | 1216 | * @clnt: client to rebind |
1202 | * | 1217 | * |