btrfs: fix comment typo in btrfs_finish_ordered_io
[cascardo/linux.git] / net / sctp / transport.c
index 1dcceb6..c97472b 100644 (file)
@@ -87,6 +87,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
 
        /* Initialize the default path max_retrans.  */
        peer->pathmaxrxt  = sctp_max_retrans_path;
+       peer->pf_retrans  = sctp_pf_retrans;
 
        INIT_LIST_HEAD(&peer->transmitted);
        INIT_LIST_HEAD(&peer->send_ready);
@@ -216,7 +217,7 @@ void sctp_transport_set_owner(struct sctp_transport *transport,
 void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk)
 {
        /* If we don't have a fresh route, look one up */
-       if (!transport->dst || transport->dst->obsolete > 1) {
+       if (!transport->dst || transport->dst->obsolete) {
                dst_release(transport->dst);
                transport->af_specific->get_dst(transport, &transport->saddr,
                                                &transport->fl, sk);
@@ -228,7 +229,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk)
                transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT;
 }
 
-void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)
+void sctp_transport_update_pmtu(struct sock *sk, struct sctp_transport *t, u32 pmtu)
 {
        struct dst_entry *dst;
 
@@ -245,8 +246,16 @@ void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)
        }
 
        dst = sctp_transport_dst_check(t);
-       if (dst)
-               dst->ops->update_pmtu(dst, pmtu);
+       if (!dst)
+               t->af_specific->get_dst(t, &t->saddr, &t->fl, sk);
+
+       if (dst) {
+               dst->ops->update_pmtu(dst, sk, NULL, pmtu);
+
+               dst = sctp_transport_dst_check(t);
+               if (!dst)
+                       t->af_specific->get_dst(t, &t->saddr, &t->fl, sk);
+       }
 }
 
 /* Caches the dst entry and source address for a transport's destination
@@ -587,7 +596,8 @@ unsigned long sctp_transport_timeout(struct sctp_transport *t)
 {
        unsigned long timeout;
        timeout = t->rto + sctp_jitter(t->rto);
-       if (t->state != SCTP_UNCONFIRMED)
+       if ((t->state != SCTP_UNCONFIRMED) &&
+           (t->state != SCTP_PF))
                timeout += t->hbinterval;
        timeout += jiffies;
        return timeout;