summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-17 10:51:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-17 10:51:01 -0700
commit23c1a60e2e9d7d07f5f686e6413fc92bfb84366f (patch)
treebb1f49058080c1daace69722f464f01836e7ff1a /drivers/md
parent09df694a65895aa27cd12456ad5e45553e2520f6 (diff)
parentc7a6d35e463caacab08ca0333bdec5b8bdce8bbb (diff)
downloadlinux-23c1a60e2e9d7d07f5f686e6413fc92bfb84366f.tar.bz2
Merge tag '3.15-fixes' of git://neil.brown.name/md
Pull md bugfix from Neil Brown: "One BUG fix for md for recent commit" * tag '3.15-fixes' of git://neil.brown.name/md: raid5: fix a race of stripe count check
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 25247a852912..ad1b9bea446e 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4370,8 +4370,7 @@ static struct stripe_head *__get_priority_stripe(struct r5conf *conf, int group)
sh->group = NULL;
}
list_del_init(&sh->lru);
- atomic_inc(&sh->count);
- BUG_ON(atomic_read(&sh->count) != 1);
+ BUG_ON(atomic_inc_return(&sh->count) != 1);
return sh;
}