diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-17 10:51:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-17 10:51:01 -0700 |
commit | 23c1a60e2e9d7d07f5f686e6413fc92bfb84366f (patch) | |
tree | bb1f49058080c1daace69722f464f01836e7ff1a | |
parent | 09df694a65895aa27cd12456ad5e45553e2520f6 (diff) | |
parent | c7a6d35e463caacab08ca0333bdec5b8bdce8bbb (diff) | |
download | op-kernel-dev-23c1a60e2e9d7d07f5f686e6413fc92bfb84366f.zip op-kernel-dev-23c1a60e2e9d7d07f5f686e6413fc92bfb84366f.tar.gz |
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
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 25247a8..ad1b9be 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; } |