projects/linux·commit 23c1a60e

Merge tag '3.15-fixes' of git://neil.brown.name/md

23c1a60e · Linus Torvalds <[email protected]> · 2014-04-17 10:51:01 -07:00

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
Commit
23c1a60e2e9d7d07f5f686e6413fc92bfb84366f
Parents
09df694a · c7a6d35e

Merge commit. Changes below are compared with the first parent: 09df694a.

Changes

1 files changed · +1 −2

FileStatusAddDelContent
drivers/md/raid5.cmodified+1−2View file

drivers/md/raid5.c

View file
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;
}