From: David S. Miller Date: Tue, 15 Jul 2008 03:22:38 +0000 (-0700) Subject: netfilter: Let nf_ct_kill() callers know if del_timer() returned true. X-Git-Tag: MMI-PSA29.97-13-9~33552^2~164 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c8894980010536915c4f5513ee180e3614aeca9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git netfilter: Let nf_ct_kill() callers know if del_timer() returned true. Signed-off-by: David S. Miller --- diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index d5d76ec7abb0..8f5b75734dd0 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -223,23 +223,23 @@ static inline void nf_ct_refresh(struct nf_conn *ct, __nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0); } -extern void __nf_ct_kill_acct(struct nf_conn *ct, - enum ip_conntrack_info ctinfo, - const struct sk_buff *skb, - int do_acct); +extern 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 void nf_ct_kill_acct(struct nf_conn *ct, - enum ip_conntrack_info ctinfo, - const struct sk_buff *skb) +static inline bool nf_ct_kill_acct(struct nf_conn *ct, + enum ip_conntrack_info ctinfo, + const struct sk_buff *skb) { - __nf_ct_kill_acct(ct, ctinfo, skb, 1); + return __nf_ct_kill_acct(ct, ctinfo, skb, 1); } /* kill conntrack without accounting */ -static inline void nf_ct_kill(struct nf_conn *ct) +static inline bool nf_ct_kill(struct nf_conn *ct) { - __nf_ct_kill_acct(ct, 0, NULL, 0); + return __nf_ct_kill_acct(ct, 0, NULL, 0); } /* These are for NAT. Icky. */ diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 212a0888408d..28d03e64200b 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -848,10 +848,10 @@ acct: } EXPORT_SYMBOL_GPL(__nf_ct_refresh_acct); -void __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, + int do_acct) { #ifdef CONFIG_NF_CT_ACCT if (do_acct) { @@ -862,8 +862,11 @@ void __nf_ct_kill_acct(struct nf_conn *ct, spin_unlock_bh(&nf_conntrack_lock); } #endif - if (del_timer(&ct->timeout)) + if (del_timer(&ct->timeout)) { ct->timeout.function((unsigned long)ct); + return true; + } + return false; } EXPORT_SYMBOL_GPL(__nf_ct_kill_acct);