diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-09-08 13:01:10 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-08 13:01:44 +0400 |
commit | 7fd4394dfe1db02ba904dfa1048f718cbca822d1 (patch) | |
tree | 902d159ced8c873ee8f58c3301c30f674f099a03 /net/sctp/associola.c | |
parent | d6cc58e127a0b7df78d869a29ff073da6fb899bb (diff) | |
parent | 7af142f752116e86adbe2073f2922d8265a77709 (diff) | |
download | linux-7fd4394dfe1db02ba904dfa1048f718cbca822d1.tar.xz |
Merge branch 'topic/pcm-nonatomic' into for-next
This is a merge for exending PCM ops to be non-atomic.
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 06a9ee6b2d3a..a88b8524846e 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -813,6 +813,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, else { dst_release(transport->dst); transport->dst = NULL; + ulp_notify = false; } spc_state = SCTP_ADDR_UNREACHABLE; @@ -1244,7 +1245,7 @@ static struct sctp_transport *sctp_trans_elect_best(struct sctp_transport *curr, { u8 score_curr, score_best; - if (best == NULL) + if (best == NULL || curr == best) return curr; score_curr = sctp_trans_score(curr); @@ -1355,14 +1356,11 @@ static void sctp_select_active_and_retran_path(struct sctp_association *asoc) trans_sec = trans_pri; /* If we failed to find a usable transport, just camp on the - * primary or retran, even if they are inactive, if possible - * pick a PF iff it's the better choice. + * active or pick a PF iff it's the better choice. */ if (trans_pri == NULL) { - trans_pri = sctp_trans_elect_best(asoc->peer.primary_path, - asoc->peer.retran_path); - trans_pri = sctp_trans_elect_best(trans_pri, trans_pf); - trans_sec = asoc->peer.primary_path; + trans_pri = sctp_trans_elect_best(asoc->peer.active_path, trans_pf); + trans_sec = trans_pri; } /* Set the active and retran transports. */ |