aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 539f43bc97d..41dd2cb07ef 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3019,12 +3019,11 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_e
3019static u32 get_acqseq(void) 3019static u32 get_acqseq(void)
3020{ 3020{
3021 u32 res; 3021 u32 res;
3022 static u32 acqseq; 3022 static atomic_t acqseq;
3023 static DEFINE_SPINLOCK(acqseq_lock);
3024 3023
3025 spin_lock_bh(&acqseq_lock); 3024 do {
3026 res = (++acqseq ? : ++acqseq); 3025 res = atomic_inc_return(&acqseq);
3027 spin_unlock_bh(&acqseq_lock); 3026 } while (!res);
3028 return res; 3027 return res;
3029} 3028}
3030 3029
@@ -3738,17 +3737,17 @@ static int __net_init pfkey_init_proc(struct net *net)
3738 return 0; 3737 return 0;
3739} 3738}
3740 3739
3741static void pfkey_exit_proc(struct net *net) 3740static void __net_exit pfkey_exit_proc(struct net *net)
3742{ 3741{
3743 proc_net_remove(net, "pfkey"); 3742 proc_net_remove(net, "pfkey");
3744} 3743}
3745#else 3744#else
3746static int __net_init pfkey_init_proc(struct net *net) 3745static inline int pfkey_init_proc(struct net *net)
3747{ 3746{
3748 return 0; 3747 return 0;
3749} 3748}
3750 3749
3751static void pfkey_exit_proc(struct net *net) 3750static inline void pfkey_exit_proc(struct net *net)
3752{ 3751{
3753} 3752}
3754#endif 3753#endif