Skip to contentSkip to conversation

NETFILTER: Use non-deprecated __RW_LOCK_UNLOCKED macro.

PATCH In review Robert P. J. Day 2 participants 2 messages Mar 15, 2008 – Mar 20, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NETFILTER: Use non-deprecated __RW_LOCK_UNLOCKED macro.

---

not compile-tested, but fairly straightforward.

 net/ipv4/netfilter/arptable_filter.c |    2 +-
 net/ipv4/netfilter/iptable_filter.c  |    2 +-
 net/ipv4/netfilter/iptable_mangle.c  |    2 +-
 net/ipv4/netfilter/iptable_raw.c     |    2 +-
 net/ipv4/netfilter/nf_nat_rule.c     |    2 +-
 net/ipv6/netfilter/ip6table_filter.c |    2 +-
 net/ipv6/netfilter/ip6table_mangle.c |    2 +-
 net/ipv6/netfilter/ip6table_raw.c    |    2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
net/ipv4/netfilter/arptable_filter.c +1 -1
index 4e9c496..629e495 100644
@@ -48,7 +48,7 @@ static struct
 static struct arpt_table packet_filter = {
 	.name		= "filter",
 	.valid_hooks	= FILTER_VALID_HOOKS,
-	.lock		= RW_LOCK_UNLOCKED,
+	.lock		= __RW_LOCK_UNLOCKED(packet_filter.lock),
 	.private	= NULL,
 	.me		= THIS_MODULE,
 	.af		= NF_ARP,
net/ipv4/netfilter/iptable_filter.c +1 -1
index 69f3d7e..1e5ea8c 100644
@@ -56,7 +56,7 @@ static struct
 static struct xt_table packet_filter = {
 	.name		= "filter",
 	.valid_hooks	= FILTER_VALID_HOOKS,
-	.lock		= RW_LOCK_UNLOCKED,
+	.lock		= __RW_LOCK_UNLOCKED(packet_filter.lock),
 	.me		= THIS_MODULE,
 	.af		= AF_INET,
 };
net/ipv4/netfilter/iptable_mangle.c +1 -1
index c55a210..d7cd5c1 100644
@@ -67,7 +67,7 @@ static struct
 static struct xt_table packet_mangler = {
 	.name		= "mangle",
 	.valid_hooks	= MANGLE_VALID_HOOKS,
-	.lock		= RW_LOCK_UNLOCKED,
+	.lock		= __RW_LOCK_UNLOCKED(packet_mangler.lock),
 	.me		= THIS_MODULE,
 	.af		= AF_INET,
 };
net/ipv4/netfilter/iptable_raw.c +1 -1
index e41fe8c..8a8422a 100644
@@ -39,7 +39,7 @@ static struct
 static struct xt_table packet_raw = {
 	.name = "raw",
 	.valid_hooks =  RAW_VALID_HOOKS,
-	.lock = RW_LOCK_UNLOCKED,
+	.lock = __RW_LOCK_UNLOCKED(packet_raw.lock),
 	.me = THIS_MODULE,
 	.af = AF_INET,
 };
net/ipv4/netfilter/nf_nat_rule.c +1 -1
index f8fda57..e330a29 100644
@@ -61,7 +61,7 @@ static struct
 static struct xt_table __nat_table = {
 	.name		= "nat",
 	.valid_hooks	= NAT_VALID_HOOKS,
-	.lock		= RW_LOCK_UNLOCKED,
+	.lock		= __RW_LOCK_UNLOCKED(__nat_table.lock),
 	.me		= THIS_MODULE,
 	.af		= AF_INET,
 };
net/ipv6/netfilter/ip6table_filter.c +1 -1
index 2d9cd09..f979e48 100644
@@ -54,7 +54,7 @@ static struct
 static struct xt_table packet_filter = {
 	.name		= "filter",
 	.valid_hooks	= FILTER_VALID_HOOKS,
-	.lock		= RW_LOCK_UNLOCKED,
+	.lock		= __RW_LOCK_UNLOCKED(packet_filter.lock),
 	.me		= THIS_MODULE,
 	.af		= AF_INET6,
 };
net/ipv6/netfilter/ip6table_mangle.c +1 -1
index 035343a..27a5e8b 100644
@@ -60,7 +60,7 @@ static struct
 static struct xt_table packet_mangler = {
 	.name		= "mangle",
 	.valid_hooks	= MANGLE_VALID_HOOKS,
-	.lock		= RW_LOCK_UNLOCKED,
+	.lock		= __RW_LOCK_UNLOCKED(packet_mangler.lock),
 	.me		= THIS_MODULE,
 	.af		= AF_INET6,
 };
net/ipv6/netfilter/ip6table_raw.c +1 -1
index 5cd8420..92b9107 100644
@@ -38,7 +38,7 @@ static struct
 static struct xt_table packet_raw = {
 	.name = "raw",
 	.valid_hooks = RAW_VALID_HOOKS,
-	.lock = RW_LOCK_UNLOCKED,
+	.lock = __RW_LOCK_UNLOCKED(packet_raw.lock),
 	.me = THIS_MODULE,
 	.af = AF_INET6,
 };

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
Have classroom, will lecture.

http://crashcourse.ca Waterloo, Ontario, CANADA
========================================================================