Loading include/linux/sunrpc/xprt.h +1 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); #define XPRT_CLOSING (6) #define XPRT_CONNECTION_ABORT (7) #define XPRT_CONNECTION_CLOSE (8) #define XPRT_INITIALIZED (9) static inline void xprt_set_connected(struct rpc_xprt *xprt) { Loading net/sunrpc/xprt.c +3 −0 Original line number Diff line number Diff line Loading @@ -1102,6 +1102,9 @@ struct rpc_xprt *xprt_create_transport(struct xprt_create *args) -PTR_ERR(xprt)); return xprt; } if (test_and_set_bit(XPRT_INITIALIZED, &xprt->state)) /* ->setup returned a pre-initialized xprt: */ return xprt; spin_lock_init(&xprt->transport_lock); spin_lock_init(&xprt->reserve_lock); Loading net/sunrpc/xprtsock.c +9 −9 Original line number Diff line number Diff line Loading @@ -2359,6 +2359,15 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args) struct svc_sock *bc_sock; struct rpc_xprt *ret; if (args->bc_xprt->xpt_bc_xprt) { /* * This server connection already has a backchannel * export; we can't create a new one, as we wouldn't be * able to match replies based on xid any more. So, * reuse the already-existing one: */ return args->bc_xprt->xpt_bc_xprt; } xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries); if (IS_ERR(xprt)) return xprt; Loading Loading @@ -2396,15 +2405,6 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args) xprt->address_strings[RPC_DISPLAY_PORT], xprt->address_strings[RPC_DISPLAY_PROTO]); /* * The backchannel uses the same socket connection as the * forechannel */ if (args->bc_xprt->xpt_bc_xprt) { /* XXX: actually, want to catch this case... */ ret = ERR_PTR(-EINVAL); goto out_err; } /* * Once we've associated a backchannel xprt with a connection, * we want to keep it around as long as long as the connection Loading Loading
include/linux/sunrpc/xprt.h +1 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); #define XPRT_CLOSING (6) #define XPRT_CONNECTION_ABORT (7) #define XPRT_CONNECTION_CLOSE (8) #define XPRT_INITIALIZED (9) static inline void xprt_set_connected(struct rpc_xprt *xprt) { Loading
net/sunrpc/xprt.c +3 −0 Original line number Diff line number Diff line Loading @@ -1102,6 +1102,9 @@ struct rpc_xprt *xprt_create_transport(struct xprt_create *args) -PTR_ERR(xprt)); return xprt; } if (test_and_set_bit(XPRT_INITIALIZED, &xprt->state)) /* ->setup returned a pre-initialized xprt: */ return xprt; spin_lock_init(&xprt->transport_lock); spin_lock_init(&xprt->reserve_lock); Loading
net/sunrpc/xprtsock.c +9 −9 Original line number Diff line number Diff line Loading @@ -2359,6 +2359,15 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args) struct svc_sock *bc_sock; struct rpc_xprt *ret; if (args->bc_xprt->xpt_bc_xprt) { /* * This server connection already has a backchannel * export; we can't create a new one, as we wouldn't be * able to match replies based on xid any more. So, * reuse the already-existing one: */ return args->bc_xprt->xpt_bc_xprt; } xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries); if (IS_ERR(xprt)) return xprt; Loading Loading @@ -2396,15 +2405,6 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args) xprt->address_strings[RPC_DISPLAY_PORT], xprt->address_strings[RPC_DISPLAY_PROTO]); /* * The backchannel uses the same socket connection as the * forechannel */ if (args->bc_xprt->xpt_bc_xprt) { /* XXX: actually, want to catch this case... */ ret = ERR_PTR(-EINVAL); goto out_err; } /* * Once we've associated a backchannel xprt with a connection, * we want to keep it around as long as long as the connection Loading