[NETFILTER]: x_tables: move table->lock initialization

xt_table->lock should be initialized before xt_replace_table() call, which
uses it. This patch removes strict requirement that table should define
lock before registering.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Dmitry Mishin and committed by David S. Miller 91536b7a e4a79ef8

+1 -1
+1 -1
net/netfilter/x_tables.c
··· 529 529 530 530 /* Simplifies replace_table code. */ 531 531 table->private = bootstrap; 532 + rwlock_init(&table->lock); 532 533 if (!xt_replace_table(table, 0, newinfo, &ret)) 533 534 goto unlock; 534 535 ··· 539 538 /* save number of initial entries */ 540 539 private->initial_entries = private->number; 541 540 542 - rwlock_init(&table->lock); 543 541 list_prepend(&xt[table->af].tables, table); 544 542 545 543 ret = 0;