diff options
author | Satoru SATOH <satoru.satoh@gmail.com> | 2008-05-05 01:14:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-05 01:14:42 -0400 |
commit | 5ffc02a158997b1eb91ade8d02bcf521ff79a218 (patch) | |
tree | 80f9082f9a35c974236b20053ae4946523311ea3 /net/decnet | |
parent | 0bbeafd0118fc3ae54990064760c889d41dc21d6 (diff) |
ip: Use inline function dst_metric() instead of direct access to dst->metric[]
There are functions to refer to the value of dst->metric[THE_METRIC-1]
directly without use of a inline function "dst_metric" defined in
net/dst.h.
The following patch changes them to use the inline function
consistently.
Signed-off-by: Satoru SATOH <satoru.satoh@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/dn_route.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 2f665a516476..f50e88bf2661 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -235,14 +235,14 @@ static void dn_dst_update_pmtu(struct dst_entry *dst, u32 mtu) | |||
235 | else | 235 | else |
236 | min_mtu -= 21; | 236 | min_mtu -= 21; |
237 | 237 | ||
238 | if (dst->metrics[RTAX_MTU-1] > mtu && mtu >= min_mtu) { | 238 | if (dst_metric(dst, RTAX_MTU) > mtu && mtu >= min_mtu) { |
239 | if (!(dst_metric_locked(dst, RTAX_MTU))) { | 239 | if (!(dst_metric_locked(dst, RTAX_MTU))) { |
240 | dst->metrics[RTAX_MTU-1] = mtu; | 240 | dst->metrics[RTAX_MTU-1] = mtu; |
241 | dst_set_expires(dst, dn_rt_mtu_expires); | 241 | dst_set_expires(dst, dn_rt_mtu_expires); |
242 | } | 242 | } |
243 | if (!(dst_metric_locked(dst, RTAX_ADVMSS))) { | 243 | if (!(dst_metric_locked(dst, RTAX_ADVMSS))) { |
244 | u32 mss = mtu - DN_MAX_NSP_DATA_HEADER; | 244 | u32 mss = mtu - DN_MAX_NSP_DATA_HEADER; |
245 | if (dst->metrics[RTAX_ADVMSS-1] > mss) | 245 | if (dst_metric(dst, RTAX_ADVMSS) > mss) |
246 | dst->metrics[RTAX_ADVMSS-1] = mss; | 246 | dst->metrics[RTAX_ADVMSS-1] = mss; |
247 | } | 247 | } |
248 | } | 248 | } |
@@ -805,12 +805,12 @@ static int dn_rt_set_next_hop(struct dn_route *rt, struct dn_fib_res *res) | |||
805 | rt->u.dst.neighbour = n; | 805 | rt->u.dst.neighbour = n; |
806 | } | 806 | } |
807 | 807 | ||
808 | if (rt->u.dst.metrics[RTAX_MTU-1] == 0 || | 808 | if (dst_metric(&rt->u.dst, RTAX_MTU) == 0 || |
809 | rt->u.dst.metrics[RTAX_MTU-1] > rt->u.dst.dev->mtu) | 809 | dst_metric(&rt->u.dst, RTAX_MTU) > rt->u.dst.dev->mtu) |
810 | rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu; | 810 | rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu; |
811 | mss = dn_mss_from_pmtu(dev, dst_mtu(&rt->u.dst)); | 811 | mss = dn_mss_from_pmtu(dev, dst_mtu(&rt->u.dst)); |
812 | if (rt->u.dst.metrics[RTAX_ADVMSS-1] == 0 || | 812 | if (dst_metric(&rt->u.dst, RTAX_ADVMSS) == 0 || |
813 | rt->u.dst.metrics[RTAX_ADVMSS-1] > mss) | 813 | dst_metric(&rt->u.dst, RTAX_ADVMSS) > mss) |
814 | rt->u.dst.metrics[RTAX_ADVMSS-1] = mss; | 814 | rt->u.dst.metrics[RTAX_ADVMSS-1] = mss; |
815 | return 0; | 815 | return 0; |
816 | } | 816 | } |