diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-06-26 18:20:23 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-07-08 20:03:26 +0200 |
commit | 878b3dfc42c4ddbf9e38cd9061e3ddd99a69747a (patch) | |
tree | 4257a40c5e9f4f3554da52ae27d6ab48a2cd448a /net/sunrpc/xprtsock.c | |
parent | NFSv4/pNFS: Return an error if _nfs4_pnfs_v3_ds_connect can't load NFSv3 (diff) | |
parent | sunrpc: remove an offlined xprt using sysfs (diff) | |
download | linux-878b3dfc42c4ddbf9e38cd9061e3ddd99a69747a.tar.xz linux-878b3dfc42c4ddbf9e38cd9061e3ddd99a69747a.zip |
Merge part 2 of branch 'sysfs-devel'
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 7319c19f4504..e573dcecdd66 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1653,6 +1653,13 @@ static int xs_get_srcport(struct sock_xprt *transport) return port; } +unsigned short get_srcport(struct rpc_xprt *xprt) +{ + struct sock_xprt *sock = container_of(xprt, struct sock_xprt, xprt); + return sock->srcport; +} +EXPORT_SYMBOL(get_srcport); + static unsigned short xs_next_srcport(struct sock_xprt *transport, unsigned short port) { if (transport->srcport != 0) |