From: Heiner Kallweit <heiner.kallweit@web.de>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH] ipv6: simplify code structure in addrconf.c/manage_tempaddrs
Date: Mon, 31 Mar 2014 20:47:42 +0200 [thread overview]
Message-ID: <5339B84E.7030708@web.de> (raw)
read_unlock_bh can be moved out of the if clause
Signed-off-by: Heiner Kallweit <heiner.kallweit@web.de>
---
net/ipv6/addrconf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6c7fa08..a65812f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2122,6 +2122,7 @@ static void manage_tempaddrs(struct inet6_dev *idev,
if (!(flags&IFA_F_TENTATIVE))
ipv6_ifa_notify(0, ift);
}
+ read_unlock_bh(&idev->lock);
if ((create || list_empty(&idev->tempaddr_list)) &&
idev->cnf.use_tempaddr > 0) {
@@ -2130,10 +2131,7 @@ static void manage_tempaddrs(struct inet6_dev *idev,
* Also create a temporary address if it's enabled but
* no temporary address currently exists.
*/
- read_unlock_bh(&idev->lock);
ipv6_create_tempaddr(ifp, NULL);
- } else {
- read_unlock_bh(&idev->lock);
}
}
--
1.9.1.315.g3f09db0.dirty
next reply other threads:[~2014-03-31 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 18:47 Heiner Kallweit [this message]
2014-03-31 19:21 ` [PATCH] ipv6: simplify code structure in addrconf.c/manage_tempaddrs Hannes Frederic Sowa
2014-03-31 19:27 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5339B84E.7030708@web.de \
--to=heiner.kallweit@web.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).