diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2008-01-08 01:34:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:00:46 -0500 |
commit | 64c31b3f76482bb64459e786f9eca3bd0164d153 (patch) | |
tree | 4f8fa9e23dbb2b2a73c4516263c983b01cff4f3a /include | |
parent | d66e37a99d323012165ce91fd5c4518e2fcea0c5 (diff) |
[XFRM] xfrm_policy_destroy: Rename and relative fixes.
Since __xfrm_policy_destroy is used to destory the resources
allocated by xfrm_policy_alloc. So using the name
__xfrm_policy_destroy is not correspond with xfrm_policy_alloc.
Rename it to xfrm_policy_destroy.
And along with some instances that call xfrm_policy_alloc
but not using xfrm_policy_destroy to destroy the resource,
fix them.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/xfrm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a419a4372e2..5ebb9ba479b 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -626,12 +626,12 @@ static inline void xfrm_pol_hold(struct xfrm_policy *policy) | |||
626 | atomic_inc(&policy->refcnt); | 626 | atomic_inc(&policy->refcnt); |
627 | } | 627 | } |
628 | 628 | ||
629 | extern void __xfrm_policy_destroy(struct xfrm_policy *policy); | 629 | extern void xfrm_policy_destroy(struct xfrm_policy *policy); |
630 | 630 | ||
631 | static inline void xfrm_pol_put(struct xfrm_policy *policy) | 631 | static inline void xfrm_pol_put(struct xfrm_policy *policy) |
632 | { | 632 | { |
633 | if (atomic_dec_and_test(&policy->refcnt)) | 633 | if (atomic_dec_and_test(&policy->refcnt)) |
634 | __xfrm_policy_destroy(policy); | 634 | xfrm_policy_destroy(policy); |
635 | } | 635 | } |
636 | 636 | ||
637 | #ifdef CONFIG_XFRM_SUB_POLICY | 637 | #ifdef CONFIG_XFRM_SUB_POLICY |