Thread (5 messages) 5 messages, 3 authors, 2004-11-30

Re: [BK PATCH] [IPV6] Multiple locking fixes/improvements

From: YOSHIFUJI Hideaki / 吉藤英明 <hidden>
Date: 2004-11-23 18:37:44

In article [ref] (at Tue, 23 Nov 2004 13:09:24 -0500), Brian Haley [off-list ref] says:
Not to nitpick, but this is just easier to read:

+static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
+{
+	read_lock_bh(&addrconf_lock);
+	if (!ifp->idev->dead)
+		__ipv6_ifa_notify(event, ifp);
+	read_unlock_bh(&addrconf_lock);
  }
agreed and added one changeset.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/11/24 03:34:53+09:00 Brian.Haley@hp.com 
#   [IPV6] improve ipv6_ifa_notify() readability.
# 
# net/ipv6/addrconf.c
#   2004/11/24 03:34:41+09:00 Brian.Haley@hp.com +2 -4
#   [IPV6] improve ipv6_ifa_notify() readability.
# 
diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
--- a/net/ipv6/addrconf.c	2004-11-24 03:35:33 +09:00
+++ b/net/ipv6/addrconf.c	2004-11-24 03:35:33 +09:00
@@ -3017,10 +3017,8 @@
 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
 {
 	read_lock_bh(&addrconf_lock);
-	if (ifp->idev->dead)
-		goto out;
-	__ipv6_ifa_notify(event, ifp);
-out:
+	if (likely(ifp->idev->dead == 0))
+		__ipv6_ifa_notify(event, ifp);
 	read_unlock_bh(&addrconf_lock);
 }
 

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help