Skip to content
Snippets Groups Projects
Commit 9eb9cf14 authored by Eric Barton's avatar Eric Barton
Browse files

* Bug 5676 fix: keep extra ref on peer until all done in

    ksocknal_del_peer_locked CVS:
parent e91e123b
No related branches found
No related tags found
No related merge requests found
...@@ -499,6 +499,9 @@ ksocknal_del_peer_locked (ksock_peer_t *peer, __u32 ip, int single_share) ...@@ -499,6 +499,9 @@ ksocknal_del_peer_locked (ksock_peer_t *peer, __u32 ip, int single_share)
LASSERT (!peer->ksnp_closing); LASSERT (!peer->ksnp_closing);
/* Extra ref prevents peer disappearing until I'm done with it */
atomic_inc(&peer->ksnp_refcount);
list_for_each_safe (tmp, nxt, &peer->ksnp_routes) { list_for_each_safe (tmp, nxt, &peer->ksnp_routes) {
route = list_entry(tmp, ksock_route_t, ksnr_list); route = list_entry(tmp, ksock_route_t, ksnr_list);
...@@ -548,6 +551,7 @@ ksocknal_del_peer_locked (ksock_peer_t *peer, __u32 ip, int single_share) ...@@ -548,6 +551,7 @@ ksocknal_del_peer_locked (ksock_peer_t *peer, __u32 ip, int single_share)
} }
} }
ksocknal_put_peer(peer);
/* NB peer unlinks itself when last conn/route is removed */ /* NB peer unlinks itself when last conn/route is removed */
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment