aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2010-12-08 13:48:19 -0500
committerJ. Bruce Fields <bfields@redhat.com>2011-01-11 15:04:10 -0500
commitf0418aa4b1103f959d64dc18273efa04ee0140e9 (patch)
tree01457cfe70d614dcdb12759247212602c2c2c008 /net/sunrpc/xprt.c
parent99de8ea962bbc11a51ad4c52e3dc93bee5f6ba70 (diff)
rpc: allow xprt_class->setup to return a preexisting xprt
This allows us to reuse the xprt associated with a server connection if one has already been set up. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 749ad15ae305..856274d7e85c 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1102,6 +1102,9 @@ found:
1102 -PTR_ERR(xprt)); 1102 -PTR_ERR(xprt));
1103 return xprt; 1103 return xprt;
1104 } 1104 }
1105 if (test_and_set_bit(XPRT_INITIALIZED, &xprt->state))
1106 /* ->setup returned a pre-initialized xprt: */
1107 return xprt;
1105 1108
1106 spin_lock_init(&xprt->transport_lock); 1109 spin_lock_init(&xprt->transport_lock);
1107 spin_lock_init(&xprt->reserve_lock); 1110 spin_lock_init(&xprt->reserve_lock);