aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_state.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index f50ee9badf47..96f2088e7448 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1462,12 +1462,12 @@ EXPORT_SYMBOL(xfrm_find_acq_byseq);
1462u32 xfrm_get_acqseq(void) 1462u32 xfrm_get_acqseq(void)
1463{ 1463{
1464 u32 res; 1464 u32 res;
1465 static u32 acqseq; 1465 static atomic_t acqseq;
1466 static DEFINE_SPINLOCK(acqseq_lock); 1466
1467 do {
1468 res = atomic_inc_return(&acqseq);
1469 } while (!res);
1467 1470
1468 spin_lock_bh(&acqseq_lock);
1469 res = (++acqseq ? : ++acqseq);
1470 spin_unlock_bh(&acqseq_lock);
1471 return res; 1471 return res;
1472} 1472}
1473EXPORT_SYMBOL(xfrm_get_acqseq); 1473EXPORT_SYMBOL(xfrm_get_acqseq);