[Devel] [PATCH RHEL7 COMMIT] ms/netlink: simplify nfnetlink_bind
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Nov 30 03:41:03 PST 2016
The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.20.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.36.1.vz7.20.7
------>
commit d28ebb190f5565de43e388a4addb2a8c0478817f
Author: Richard Guy Briggs <rgb at redhat.com>
Date: Wed Nov 30 15:41:03 2016 +0400
ms/netlink: simplify nfnetlink_bind
Remove duplicity and simplify code flow by moving the rcu_read_unlock() above
the condition and let the flow control exit naturally at the end of the
function.
Signed-off-by: Richard Guy Briggs <rgb at redhat.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
This is done in the scope of
https://jira.sw.ru/browse/PSBM-54189
upstream commit: bfe4bc71c64a34813a7bde0ad4d28486679ac3fe
Signed-off-by: Igor Redko <redkoi at virtuozzo.com>
Acked-by: Andrei Vagin <avagin at openvz.org>
---
net/netfilter/nfnetlink.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index e009087..48cf7a1 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -406,12 +406,9 @@ static void nfnetlink_bind(int group)
rcu_read_lock();
ss = nfnetlink_get_subsys(type);
- if (!ss) {
- rcu_read_unlock();
- request_module("nfnetlink-subsys-%d", type);
- return;
- }
rcu_read_unlock();
+ if (!ss)
+ request_module("nfnetlink-subsys-%d", type);
}
#endif
More information about the Devel
mailing list