diff mbox

netfilter: Use proper rwlock init function

Message ID alpine.LFD.2.02.1110051522410.18778@ionos
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Thomas Gleixner Oct. 5, 2011, 1:24 p.m. UTC
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

Comments

Hans Schillstrom Oct. 5, 2011, 1:54 p.m. UTC | #1
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. UTC | #2
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
diff mbox

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++)