* [PATCH] xfrm: remove the xfrm_queue_purge definition
@ 2015-04-22 7:51 roy.qing.li
2015-04-27 10:35 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2015-04-22 7:51 UTC (permalink / raw)
To: netdev; +Cc: steffen.klassert, herbert
From: Li RongQing <roy.qing.li@gmail.com>
The task of xfrm_queue_purge is same as skb_queue_purge, so remove it
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
net/xfrm/xfrm_policy.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 638af06..d8c35ad 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -315,14 +315,6 @@ void xfrm_policy_destroy(struct xfrm_policy *policy)
}
EXPORT_SYMBOL(xfrm_policy_destroy);
-static void xfrm_queue_purge(struct sk_buff_head *list)
-{
- struct sk_buff *skb;
-
- while ((skb = skb_dequeue(list)) != NULL)
- kfree_skb(skb);
-}
-
/* Rule must be locked. Release descentant resources, announce
* entry dead. The rule must be unlinked from lists to the moment.
*/
@@ -335,7 +327,7 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
if (del_timer(&policy->polq.hold_timer))
xfrm_pol_put(policy);
- xfrm_queue_purge(&policy->polq.hold_queue);
+ skb_queue_purge(&policy->polq.hold_queue);
if (del_timer(&policy->timer))
xfrm_pol_put(policy);
@@ -1955,7 +1947,7 @@ out:
purge_queue:
pq->timeout = 0;
- xfrm_queue_purge(&pq->hold_queue);
+ skb_queue_purge(&pq->hold_queue);
xfrm_pol_put(pol);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfrm: remove the xfrm_queue_purge definition
2015-04-22 7:51 [PATCH] xfrm: remove the xfrm_queue_purge definition roy.qing.li
@ 2015-04-27 10:35 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2015-04-27 10:35 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, herbert
On Wed, Apr 22, 2015 at 03:51:16PM +0800, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> The task of xfrm_queue_purge is same as skb_queue_purge, so remove it
>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Applied to ipsec-next, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-27 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22 7:51 [PATCH] xfrm: remove the xfrm_queue_purge definition roy.qing.li
2015-04-27 10:35 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).