netfilter: remove __nf_ct_kill_acct helper
authorFlorian Westphal <fw@strlen.de>
Thu, 25 Aug 2016 13:33:35 +0000 (15:33 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 30 Aug 2016 09:43:10 +0000 (11:43 +0200)
After timer removal this just calls nf_ct_delete so remove the __ prefix
version and make nf_ct_kill a shorthand for nf_ct_delete.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack.h
net/netfilter/nf_conntrack_core.c

index 7277751128e83e6beec363af5a9fb2e3341d806d..50418052a520f396e8ae550160ca81e51ad89857 100644 (file)
@@ -219,21 +219,14 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
        __nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0);
 }
 
-bool __nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
-                      const struct sk_buff *skb, int do_acct);
-
 /* kill conntrack and do accounting */
-static inline bool nf_ct_kill_acct(struct nf_conn *ct,
-                                  enum ip_conntrack_info ctinfo,
-                                  const struct sk_buff *skb)
-{
-       return __nf_ct_kill_acct(ct, ctinfo, skb, 1);
-}
+bool nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
+                    const struct sk_buff *skb);
 
 /* kill conntrack without accounting */
 static inline bool nf_ct_kill(struct nf_conn *ct)
 {
-       return __nf_ct_kill_acct(ct, 0, NULL, 0);
+       return nf_ct_delete(ct, 0, 0);
 }
 
 /* These are for NAT.  Icky. */
index 7c66ce401ce9dc051130d72226ba839b4b7dfac0..ac1db4019d5c2053e4c507b33073e1471a21193f 100644 (file)
@@ -1430,17 +1430,15 @@ acct:
 }
 EXPORT_SYMBOL_GPL(__nf_ct_refresh_acct);
 
-bool __nf_ct_kill_acct(struct nf_conn *ct,
-                      enum ip_conntrack_info ctinfo,
-                      const struct sk_buff *skb,
-                      int do_acct)
+bool nf_ct_kill_acct(struct nf_conn *ct,
+                    enum ip_conntrack_info ctinfo,
+                    const struct sk_buff *skb)
 {
-       if (do_acct)
-               nf_ct_acct_update(ct, ctinfo, skb->len);
+       nf_ct_acct_update(ct, ctinfo, skb->len);
 
        return nf_ct_delete(ct, 0, 0);
 }
-EXPORT_SYMBOL_GPL(__nf_ct_kill_acct);
+EXPORT_SYMBOL_GPL(nf_ct_kill_acct);
 
 #if IS_ENABLED(CONFIG_NF_CT_NETLINK)