Skip to content

Commit 23c1a60

Browse files
committed
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
2 parents 09df694 + c7a6d35 commit 23c1a60

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/md/raid5.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4370,8 +4370,7 @@ static struct stripe_head *__get_priority_stripe(struct r5conf *conf, int group)
43704370
sh->group = NULL;
43714371
}
43724372
list_del_init(&sh->lru);
4373-
atomic_inc(&sh->count);
4374-
BUG_ON(atomic_read(&sh->count) != 1);
4373+
BUG_ON(atomic_inc_return(&sh->count) != 1);
43754374
return sh;
43764375
}
43774376

0 commit comments

Comments
 (0)