Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: Remove useless param helper of nf_ct_helper_ext_add

The param helper of nf_ct_helper_ext_add is useless now, then remove
it now.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Gao Feng and committed by
Pablo Neira Ayuso
440534d3 762c4007

+8 -12
+1 -3
include/net/netfilter/nf_conntrack_helper.h
··· 103 103 void nf_conntrack_helpers_unregister(struct nf_conntrack_helper *, 104 104 unsigned int); 105 105 106 - struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, 107 - struct nf_conntrack_helper *helper, 108 - gfp_t gfp); 106 + struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp); 109 107 110 108 int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl, 111 109 gfp_t flags);
+1 -2
net/netfilter/nf_conntrack_core.c
··· 1401 1401 /* exp->master safe, refcnt bumped in nf_ct_find_expectation */ 1402 1402 ct->master = exp->master; 1403 1403 if (exp->helper) { 1404 - help = nf_ct_helper_ext_add(ct, exp->helper, 1405 - GFP_ATOMIC); 1404 + help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); 1406 1405 if (help) 1407 1406 rcu_assign_pointer(help->helper, exp->helper); 1408 1407 }
+2 -3
net/netfilter/nf_conntrack_helper.c
··· 192 192 EXPORT_SYMBOL_GPL(nf_conntrack_helper_put); 193 193 194 194 struct nf_conn_help * 195 - nf_ct_helper_ext_add(struct nf_conn *ct, 196 - struct nf_conntrack_helper *helper, gfp_t gfp) 195 + nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp) 197 196 { 198 197 struct nf_conn_help *help; 199 198 ··· 261 262 } 262 263 263 264 if (help == NULL) { 264 - help = nf_ct_helper_ext_add(ct, helper, flags); 265 + help = nf_ct_helper_ext_add(ct, flags); 265 266 if (help == NULL) 266 267 return -ENOMEM; 267 268 } else {
+1 -1
net/netfilter/nf_conntrack_netlink.c
··· 1947 1947 } else { 1948 1948 struct nf_conn_help *help; 1949 1949 1950 - help = nf_ct_helper_ext_add(ct, helper, GFP_ATOMIC); 1950 + help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); 1951 1951 if (help == NULL) { 1952 1952 err = -ENOMEM; 1953 1953 goto err2;
+1 -1
net/netfilter/nft_ct.c
··· 870 870 if (test_bit(IPS_HELPER_BIT, &ct->status)) 871 871 return; 872 872 873 - help = nf_ct_helper_ext_add(ct, to_assign, GFP_ATOMIC); 873 + help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); 874 874 if (help) { 875 875 rcu_assign_pointer(help->helper, to_assign); 876 876 set_bit(IPS_HELPER_BIT, &ct->status);
+1 -1
net/netfilter/xt_CT.c
··· 93 93 return -ENOENT; 94 94 } 95 95 96 - help = nf_ct_helper_ext_add(ct, helper, GFP_KERNEL); 96 + help = nf_ct_helper_ext_add(ct, GFP_KERNEL); 97 97 if (help == NULL) { 98 98 nf_conntrack_helper_put(helper); 99 99 return -ENOMEM;
+1 -1
net/openvswitch/conntrack.c
··· 1303 1303 return -EINVAL; 1304 1304 } 1305 1305 1306 - help = nf_ct_helper_ext_add(info->ct, helper, GFP_KERNEL); 1306 + help = nf_ct_helper_ext_add(info->ct, GFP_KERNEL); 1307 1307 if (!help) { 1308 1308 nf_conntrack_helper_put(helper); 1309 1309 return -ENOMEM;