Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315079
b: refs/heads/master
c: 3124873
h: refs/heads/master
i:
  315077: 3a52708
  315075: e969060
  315071: 7e6ea40
v: v3
  • Loading branch information
David S. Miller committed Jul 11, 2012
1 parent 995c827 commit 3164f57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2db2d67e4cf6100249bad575d9c13c16fd7b06dc
refs/heads/master: 312487313d4f7177cb751830e3d9c218e42ed59e
30 changes: 2 additions & 28 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,34 +158,8 @@ static void ipv4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,

static u32 *ipv4_cow_metrics(struct dst_entry *dst, unsigned long old)
{
struct rtable *rt = (struct rtable *) dst;
struct inet_peer *peer;
u32 *p = NULL;

peer = rt_get_peer_create(rt, rt->rt_dst);
if (peer) {
u32 *old_p = __DST_METRICS_PTR(old);
unsigned long prev, new;

p = peer->metrics;
if (inet_metrics_new(peer))
memcpy(p, old_p, sizeof(u32) * RTAX_MAX);

new = (unsigned long) p;
prev = cmpxchg(&dst->_metrics, old, new);

if (prev != old) {
p = __DST_METRICS_PTR(prev);
if (prev & DST_METRICS_READ_ONLY)
p = NULL;
} else {
if (rt->fi) {
fib_info_put(rt->fi);
rt->fi = NULL;
}
}
}
return p;
WARN_ON(1);
return NULL;
}

static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,
Expand Down

0 comments on commit 3164f57

Please sign in to comment.