diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-22 18:40:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-27 11:30:50 -0700 |
commit | eaa255a8d548bbe8d70f6794bd64029cbb7a02ec (patch) | |
tree | dd009f506f5909f6b135d193dfae2157ca431601 /net | |
parent | 95e7148d08d0578687ea26cd3a8925aa5f7bc8fa (diff) |
SUNRPC: Never reuse the socket port after an xs_close()
commit 246408dcd5dfeef2df437ccb0ef4d6ee87805f58 upstream.
If we call xs_close(), we're in one of two situations:
- Autoclose, which means we don't expect to resend a request
- bind+connect failed, which probably means the port is in use
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index b6fcf68dc35..d2704035636 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -743,6 +743,8 @@ static void xs_reset_transport(struct sock_xprt *transport) if (sk == NULL) return; + transport->srcport = 0; + write_lock_bh(&sk->sk_callback_lock); transport->inet = NULL; transport->sock = NULL; |