linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] md: convert double atomic_inc() to atomic_add()
@ 2011-06-02  4:53 Namhyung Kim
  2011-06-02  4:53 ` [PATCH 2/2] md: check ->hot_remove_disk when removing disk Namhyung Kim
  2011-06-02  5:47 ` [PATCH 1/2] md: convert double atomic_inc() to atomic_add() NeilBrown
  0 siblings, 2 replies; 4+ messages in thread
From: Namhyung Kim @ 2011-06-02  4:53 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, linux-kernel

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 drivers/md/md.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index aa640a85bb21..f210e42a56ca 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -396,8 +396,7 @@ static void submit_flushes(struct work_struct *ws)
 			 * we reclaim rcu_read_lock
 			 */
 			struct bio *bi;
-			atomic_inc(&rdev->nr_pending);
-			atomic_inc(&rdev->nr_pending);
+			atomic_add(2, &rdev->nr_pending);
 			rcu_read_unlock();
 			bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev);
 			bi->bi_end_io = md_end_flush;
-- 
1.7.5.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-02  5:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-02  4:53 [PATCH 1/2] md: convert double atomic_inc() to atomic_add() Namhyung Kim
2011-06-02  4:53 ` [PATCH 2/2] md: check ->hot_remove_disk when removing disk Namhyung Kim
2011-06-02  5:53   ` NeilBrown
2011-06-02  5:47 ` [PATCH 1/2] md: convert double atomic_inc() to atomic_add() NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).