aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-24 13:00:21 -0400
committerTejun Heo <tj@kernel.org>2014-09-24 13:00:21 -0400
commitd06efebf0c37d438fcf07057be00dd40fcfce08d (patch)
tree31a0786d132aadf4cbb9725f3f444ef6e1052128 /net/sctp
parentbb2e226b3bef596dd56be97df655d857b4603923 (diff)
parent0a30288da1aec914e158c2d7a3482a85f632750f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block into for-3.18
This is to receive 0a30288da1ae ("blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe") which implements __percpu_ref_kill_expedited() to work around SCSI blk-mq stall. The commit reverted and patches to implement proper fix will be added. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/associola.c12
-rw-r--r--net/sctp/socket.c2
2 files changed, 6 insertions, 8 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,
813 else { 813 else {
814 dst_release(transport->dst); 814 dst_release(transport->dst);
815 transport->dst = NULL; 815 transport->dst = NULL;
816 ulp_notify = false;
816 } 817 }
817 818
818 spc_state = SCTP_ADDR_UNREACHABLE; 819 spc_state = SCTP_ADDR_UNREACHABLE;
@@ -1244,7 +1245,7 @@ static struct sctp_transport *sctp_trans_elect_best(struct sctp_transport *curr,
1244{ 1245{
1245 u8 score_curr, score_best; 1246 u8 score_curr, score_best;
1246 1247
1247 if (best == NULL) 1248 if (best == NULL || curr == best)
1248 return curr; 1249 return curr;
1249 1250
1250 score_curr = sctp_trans_score(curr); 1251 score_curr = sctp_trans_score(curr);
@@ -1355,14 +1356,11 @@ static void sctp_select_active_and_retran_path(struct sctp_association *asoc)
1355 trans_sec = trans_pri; 1356 trans_sec = trans_pri;
1356 1357
1357 /* If we failed to find a usable transport, just camp on the 1358 /* If we failed to find a usable transport, just camp on the
1358 * primary or retran, even if they are inactive, if possible 1359 * active or pick a PF iff it's the better choice.
1359 * pick a PF iff it's the better choice.
1360 */ 1360 */
1361 if (trans_pri == NULL) { 1361 if (trans_pri == NULL) {
1362 trans_pri = sctp_trans_elect_best(asoc->peer.primary_path, 1362 trans_pri = sctp_trans_elect_best(asoc->peer.active_path, trans_pf);
1363 asoc->peer.retran_path); 1363 trans_sec = trans_pri;
1364 trans_pri = sctp_trans_elect_best(trans_pri, trans_pf);
1365 trans_sec = asoc->peer.primary_path;
1366 } 1364 }
1367 1365
1368 /* Set the active and retran transports. */ 1366 /* Set the active and retran transports. */
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index eb71d49e7653..634a2abb5f3a 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4243,7 +4243,7 @@ static int sctp_getsockopt_sctp_status(struct sock *sk, int len,
4243 transport = asoc->peer.primary_path; 4243 transport = asoc->peer.primary_path;
4244 4244
4245 status.sstat_assoc_id = sctp_assoc2id(asoc); 4245 status.sstat_assoc_id = sctp_assoc2id(asoc);
4246 status.sstat_state = asoc->state; 4246 status.sstat_state = sctp_assoc_to_state(asoc);
4247 status.sstat_rwnd = asoc->peer.rwnd; 4247 status.sstat_rwnd = asoc->peer.rwnd;
4248 status.sstat_unackdata = asoc->unack_data; 4248 status.sstat_unackdata = asoc->unack_data;
4249 4249