Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next
[platform/kernel/linux-rpi.git] / net / netfilter / nf_tables_api.c
index 128ee3b..217006f 100644 (file)
@@ -8367,10 +8367,8 @@ static int nf_tables_commit_chain_prepare(struct net *net, struct nft_chain *cha
        if (chain->blob_next || !nft_is_active_next(net, chain))
                return 0;
 
-       rule = list_entry(&chain->rules, struct nft_rule, list);
-
        data_size = 0;
-       list_for_each_entry_continue(rule, &chain->rules, list) {
+       list_for_each_entry(rule, &chain->rules, list) {
                if (nft_is_active_next(net, rule)) {
                        data_size += sizeof(*prule) + rule->dlen;
                        if (data_size > INT_MAX)
@@ -8387,7 +8385,7 @@ static int nf_tables_commit_chain_prepare(struct net *net, struct nft_chain *cha
        data_boundary = data + data_size;
        size = 0;
 
-       list_for_each_entry_continue(rule, &chain->rules, list) {
+       list_for_each_entry(rule, &chain->rules, list) {
                if (!nft_is_active_next(net, rule))
                        continue;