net: Add initial_ref arg to dst_alloc().

This allows avoiding multiple writes to the initial __refcnt.

The most simplest cases of wanting an initial reference of "1"
in ipv4 and ipv6 have been converted, the rest have been left
along and kept at the existing "0".

Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
David S. Miller 2011-02-16 14:08:44 -08:00
commit 3c7bd1a140
6 changed files with 10 additions and 14 deletions

View file

@ -1122,7 +1122,7 @@ make_route:
if (dev_out->flags & IFF_LOOPBACK)
flags |= RTCF_LOCAL;
rt = dst_alloc(&dn_dst_ops);
rt = dst_alloc(&dn_dst_ops, 0);
if (rt == NULL)
goto e_nobufs;
@ -1383,7 +1383,7 @@ static int dn_route_input_slow(struct sk_buff *skb)
}
make_route:
rt = dst_alloc(&dn_dst_ops);
rt = dst_alloc(&dn_dst_ops, 0);
if (rt == NULL)
goto e_nobufs;