Patchwork netfilter: Use proper rwlock init function

login
register
mail settings
Submitter Thomas Gleixner
Date Oct. 5, 2011, 1:24 p.m.
Message ID <alpine.LFD.2.02.1110051522410.18778@ionos>
Download mbox | patch
Permalink /patch/117839/
State Accepted
Delegated to: David Miller
Headers show

Comments

Thomas Gleixner - Oct. 5, 2011, 1:24 p.m.
Replace the open coded initialization with the init function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 net/netfilter/ipvs/ip_vs_ctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hans Schillstrom - Oct. 5, 2011, 1:54 p.m.
Hello Simon,
you can drop my "fix lockdep warning" patch
since Thomas patch is identical to what I prepared to send...

>Replace the open coded initialization with the init function.
>
>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Ack-by: Hans Schillstrom <hans.schillstrom@ericsson.com>

>---
> net/netfilter/ipvs/ip_vs_ctl.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>Index: linux-2.6/net/netfilter/ipvs/ip_vs_ctl.c
>===================================================================
>--- linux-2.6.orig/net/netfilter/ipvs/ip_vs_ctl.c
>+++ linux-2.6/net/netfilter/ipvs/ip_vs_ctl.c
>@@ -3679,7 +3679,7 @@ int __net_init __ip_vs_control_init(stru
>        int idx;
>        struct netns_ipvs *ipvs = net_ipvs(net);
>
>-       ipvs->rs_lock = __RW_LOCK_UNLOCKED(ipvs->rs_lock);
>+       rwlock_init(&ipvs->rs_lock);
>
>        /* Initialize rs_table */
>        for (idx = 0; idx < IP_VS_RTAB_SIZE; idx++)

Thanks
Hans--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Oct. 5, 2011, 9:51 p.m.
From: Hans Schillström <hans.schillstrom@ericsson.com>
Date: Wed, 5 Oct 2011 15:54:07 +0200

> Hello Simon,
> you can drop my "fix lockdep warning" patch
> since Thomas patch is identical to what I prepared to send...
> 
>>Replace the open coded initialization with the init function.
>>
>>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> 
> Ack-by: Hans Schillstrom <hans.schillstrom@ericsson.com>

[ It's "Acked-by" btw...]

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

Index: linux-2.6/net/netfilter/ipvs/ip_vs_ctl.c
===================================================================
--- linux-2.6.orig/net/netfilter/ipvs/ip_vs_ctl.c
+++ linux-2.6/net/netfilter/ipvs/ip_vs_ctl.c
@@ -3679,7 +3679,7 @@  int __net_init __ip_vs_control_init(stru
 	int idx;
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
-	ipvs->rs_lock = __RW_LOCK_UNLOCKED(ipvs->rs_lock);
+	rwlock_init(&ipvs->rs_lock);
 
 	/* Initialize rs_table */
 	for (idx = 0; idx < IP_VS_RTAB_SIZE; idx++)