From: Ralf Baechle <ralf@linux-mips.org>
To: linux-hams@vger.kernel.org
Cc: Bernard F6BVP <f6bvp@free.fr>
Subject: [PATCH v2 5/7] NET: ROSE: Make rose_neigh_no atomic.
Date: Wed, 20 Jul 2011 19:09:15 +0100 [thread overview]
Message-ID: <20110720180915.GA18223@linux-mips.org> (raw)
In-Reply-To: <c58abd832957dd882cc233fd5913c671b6c00d26.1311152437.git.ralf@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
This patch fixes the build error introduced by the first patch.
net/rose/rose_route.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index db6b96d..18e7d00 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -38,7 +38,7 @@
#include <net/rose.h>
#include <linux/seq_file.h>
-static unsigned int rose_neigh_no = 1;
+static atomic_t rose_neigh_no = ATOMIC_INIT(0);
static struct rose_node *rose_node_list;
static DEFINE_SPINLOCK(rose_node_list_lock);
@@ -101,7 +101,7 @@ static int __must_check rose_add_node(struct rose_route_struct *rose_route,
atomic_set(&rose_neigh->use, 0);
rose_neigh->dce_mode = 0;
rose_neigh->loopback = 0;
- rose_neigh->number = rose_neigh_no++;
+ rose_neigh->number = atomic_inc_return(&rose_neigh_no);
rose_neigh->restarted = 0;
skb_queue_head_init(&rose_neigh->queue);
@@ -388,7 +388,7 @@ void rose_add_loopback_neigh(void)
atomic_set(&sn->use, 0);
sn->dce_mode = 1;
sn->loopback = 1;
- sn->number = rose_neigh_no++;
+ sn->number = atomic_inc_return(&rose_neigh_no);
sn->restarted = 1;
skb_queue_head_init(&sn->queue);
next prev parent reply other threads:[~2011-07-20 18:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 9:00 [PATCH 0/7] ROSE: Misc fixes Ralf Baechle
2011-07-20 0:21 ` [PATCH 2/7] NET: ROSE: Factor our common code from functions Ralf Baechle
2011-07-20 0:21 ` [PATCH 1/7] NET: ROSE: Fix race in SIOCRSSL2CALL ioctl accessing userspace Ralf Baechle
2011-07-20 0:37 ` [PATCH 3/7] NET: ROSE: Protect rose_callsign with a spinlock Ralf Baechle
2013-08-06 17:57 ` [PATCH] ax25tools mheard : don't display empty records f6bvp@free
2013-08-07 8:17 ` Thomas Osterried
2013-08-07 10:06 ` f6bvp@free
2013-08-09 8:10 ` Thomas Osterried
2011-07-20 8:11 ` [PATCH 4/7] NET: ROSE: Make neighbour->use atomic Ralf Baechle
2011-07-20 8:11 ` [PATCH 5/7] NET: ROSE: Make rose_neigh_no atomic Ralf Baechle
2011-07-20 18:09 ` Ralf Baechle [this message]
2011-07-20 8:11 ` [PATCH 6/7] NET: ROSE: Move return statements hidden behind an if to their own line Ralf Baechle
2011-07-20 8:11 ` [PATCH 7/7] NET: ROSE: Fix formatting Ralf Baechle
2011-07-20 17:15 ` [PATCH 0/7] ROSE: Misc fixes Bernard, f6bvp
2011-07-20 17:59 ` Ralf Baechle DL5RB
2011-07-22 9:10 ` Bernard, f6bvp
2011-07-22 10:56 ` Ralf Baechle DL5RB
2011-07-22 16:12 ` f6bvp
2011-07-23 13:28 ` Ralf Baechle DL5RB
2011-07-29 22:32 ` f6bvp
2011-08-08 13:40 ` f6bvp
2011-08-08 14:06 ` Ralf Baechle
2011-08-08 15:33 ` f6bvp
2011-08-19 13:07 ` f6bvp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110720180915.GA18223@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=f6bvp@free.fr \
--cc=linux-hams@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox