aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mcast.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-29 00:47:18 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-29 00:47:18 -0500
commit0a8c5395f90f06d128247844b2515c8bf3f2826b (patch)
treed95382dcdfa303b99d480c01763d6cb6767fdaca /net/ipv6/mcast.c
parent25051158bbed127e8672b43396c71c5eb610e5f1 (diff)
parent3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff)
[XFS] Fix merge failures
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: fs/xfs/linux-2.6/xfs_cred.h fs/xfs/linux-2.6/xfs_globals.h fs/xfs/linux-2.6/xfs_ioctl.c fs/xfs/xfs_vnodeops.h Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r--net/ipv6/mcast.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index d7b3c6d398ae..a51fb33e6864 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -303,20 +303,23 @@ static struct inet6_dev *ip6_mc_find_dev(struct net *net,
303 dev = dev_get_by_index(net, ifindex); 303 dev = dev_get_by_index(net, ifindex);
304 304
305 if (!dev) 305 if (!dev)
306 return NULL; 306 goto nodev;
307 idev = in6_dev_get(dev); 307 idev = in6_dev_get(dev);
308 if (!idev) { 308 if (!idev)
309 dev_put(dev); 309 goto release;
310 return NULL;
311 }
312 read_lock_bh(&idev->lock); 310 read_lock_bh(&idev->lock);
313 if (idev->dead) { 311 if (idev->dead)
314 read_unlock_bh(&idev->lock); 312 goto unlock_release;
315 in6_dev_put(idev); 313
316 dev_put(dev);
317 return NULL;
318 }
319 return idev; 314 return idev;
315
316unlock_release:
317 read_unlock_bh(&idev->lock);
318 in6_dev_put(idev);
319release:
320 dev_put(dev);
321nodev:
322 return NULL;
320} 323}
321 324
322void ipv6_sock_mc_close(struct sock *sk) 325void ipv6_sock_mc_close(struct sock *sk)
@@ -1466,7 +1469,7 @@ static void mld_sendpack(struct sk_buff *skb)
1466 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, 1469 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
1467 skb->dev->ifindex); 1470 skb->dev->ifindex);
1468 1471
1469 err = xfrm_lookup(&skb->dst, &fl, NULL, 0); 1472 err = xfrm_lookup(net, &skb->dst, &fl, NULL, 0);
1470 if (err) 1473 if (err)
1471 goto err_out; 1474 goto err_out;
1472 1475
@@ -1817,7 +1820,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
1817 1820
1818 hdr->icmp6_cksum = csum_ipv6_magic(saddr, snd_addr, len, 1821 hdr->icmp6_cksum = csum_ipv6_magic(saddr, snd_addr, len,
1819 IPPROTO_ICMPV6, 1822 IPPROTO_ICMPV6,
1820 csum_partial((__u8 *) hdr, len, 0)); 1823 csum_partial(hdr, len, 0));
1821 1824
1822 idev = in6_dev_get(skb->dev); 1825 idev = in6_dev_get(skb->dev);
1823 1826
@@ -1831,7 +1834,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
1831 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, 1834 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
1832 skb->dev->ifindex); 1835 skb->dev->ifindex);
1833 1836
1834 err = xfrm_lookup(&skb->dst, &fl, NULL, 0); 1837 err = xfrm_lookup(net, &skb->dst, &fl, NULL, 0);
1835 if (err) 1838 if (err)
1836 goto err_out; 1839 goto err_out;
1837 1840
@@ -2430,9 +2433,9 @@ static int igmp6_mc_seq_show(struct seq_file *seq, void *v)
2430 struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq); 2433 struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq);
2431 2434
2432 seq_printf(seq, 2435 seq_printf(seq,
2433 "%-4d %-15s " NIP6_SEQFMT " %5d %08X %ld\n", 2436 "%-4d %-15s %pi6 %5d %08X %ld\n",
2434 state->dev->ifindex, state->dev->name, 2437 state->dev->ifindex, state->dev->name,
2435 NIP6(im->mca_addr), 2438 &im->mca_addr,
2436 im->mca_users, im->mca_flags, 2439 im->mca_users, im->mca_flags,
2437 (im->mca_flags&MAF_TIMER_RUNNING) ? 2440 (im->mca_flags&MAF_TIMER_RUNNING) ?
2438 jiffies_to_clock_t(im->mca_timer.expires-jiffies) : 0); 2441 jiffies_to_clock_t(im->mca_timer.expires-jiffies) : 0);
@@ -2591,10 +2594,10 @@ static int igmp6_mcf_seq_show(struct seq_file *seq, void *v)
2591 "Source Address", "INC", "EXC"); 2594 "Source Address", "INC", "EXC");
2592 } else { 2595 } else {
2593 seq_printf(seq, 2596 seq_printf(seq,
2594 "%3d %6.6s " NIP6_SEQFMT " " NIP6_SEQFMT " %6lu %6lu\n", 2597 "%3d %6.6s %pi6 %pi6 %6lu %6lu\n",
2595 state->dev->ifindex, state->dev->name, 2598 state->dev->ifindex, state->dev->name,
2596 NIP6(state->im->mca_addr), 2599 &state->im->mca_addr,
2597 NIP6(psf->sf_addr), 2600 &psf->sf_addr,
2598 psf->sf_count[MCAST_INCLUDE], 2601 psf->sf_count[MCAST_INCLUDE],
2599 psf->sf_count[MCAST_EXCLUDE]); 2602 psf->sf_count[MCAST_EXCLUDE]);
2600 } 2603 }