diff options
Diffstat (limited to 'include/net/xfrm.h')
| -rw-r--r-- | include/net/xfrm.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 7298a53b9702..85386becbaea 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -853,7 +853,7 @@ static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | |||
| 853 | xfrm_pol_put(pols[i]); | 853 | xfrm_pol_put(pols[i]); |
| 854 | } | 854 | } |
| 855 | 855 | ||
| 856 | void __xfrm_state_destroy(struct xfrm_state *); | 856 | void __xfrm_state_destroy(struct xfrm_state *, bool); |
| 857 | 857 | ||
| 858 | static inline void __xfrm_state_put(struct xfrm_state *x) | 858 | static inline void __xfrm_state_put(struct xfrm_state *x) |
| 859 | { | 859 | { |
| @@ -863,7 +863,13 @@ static inline void __xfrm_state_put(struct xfrm_state *x) | |||
| 863 | static inline void xfrm_state_put(struct xfrm_state *x) | 863 | static inline void xfrm_state_put(struct xfrm_state *x) |
| 864 | { | 864 | { |
| 865 | if (refcount_dec_and_test(&x->refcnt)) | 865 | if (refcount_dec_and_test(&x->refcnt)) |
| 866 | __xfrm_state_destroy(x); | 866 | __xfrm_state_destroy(x, false); |
| 867 | } | ||
| 868 | |||
| 869 | static inline void xfrm_state_put_sync(struct xfrm_state *x) | ||
| 870 | { | ||
| 871 | if (refcount_dec_and_test(&x->refcnt)) | ||
| 872 | __xfrm_state_destroy(x, true); | ||
| 867 | } | 873 | } |
| 868 | 874 | ||
| 869 | static inline void xfrm_state_hold(struct xfrm_state *x) | 875 | static inline void xfrm_state_hold(struct xfrm_state *x) |
| @@ -1590,7 +1596,7 @@ struct xfrmk_spdinfo { | |||
| 1590 | 1596 | ||
| 1591 | struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq); | 1597 | struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 mark, u32 seq); |
| 1592 | int xfrm_state_delete(struct xfrm_state *x); | 1598 | int xfrm_state_delete(struct xfrm_state *x); |
| 1593 | int xfrm_state_flush(struct net *net, u8 proto, bool task_valid); | 1599 | int xfrm_state_flush(struct net *net, u8 proto, bool task_valid, bool sync); |
| 1594 | int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid); | 1600 | int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid); |
| 1595 | void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si); | 1601 | void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si); |
| 1596 | void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); | 1602 | void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); |
