From 43a671f4076fdaf4e88c31ea24e79af2b803fae6 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 29 Jan 2010 04:05:52 +0000 Subject: [PATCH] --- yaml --- r: 183780 b: refs/heads/master c: 28aecb9d7728dc26bf03ce7925fe622023a83a2a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/key/af_key.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 187cbaa275bc..13a87082568f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d1c9ae6d1e7b95cedc8e39e8949e795379a0669e +refs/heads/master: 28aecb9d7728dc26bf03ce7925fe622023a83a2a diff --git a/trunk/net/key/af_key.c b/trunk/net/key/af_key.c index 4744b1f6372f..e2aacf0ba013 100644 --- a/trunk/net/key/af_key.c +++ b/trunk/net/key/af_key.c @@ -3019,12 +3019,11 @@ static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_e static u32 get_acqseq(void) { u32 res; - static u32 acqseq; - static DEFINE_SPINLOCK(acqseq_lock); + static atomic_t acqseq; - spin_lock_bh(&acqseq_lock); - res = (++acqseq ? : ++acqseq); - spin_unlock_bh(&acqseq_lock); + do { + res = atomic_inc_return(&acqseq); + } while (!res); return res; }