2014-04-17 07:12:19

by NeilBrown

[permalink] [raw]
Subject: [GIT PULL REQUEST] one md BUG-fix for 3.15-rc

The following changes since commit e240c1839d11152b0355442f8ac6d2d2d921be36:

raid5: get_active_stripe avoids device_lock (2014-04-09 14:42:42 +1000)

are available in the git repository at:

git://neil.brown.name/md tags/3.15-fixes

for you to fetch changes up to c7a6d35e463caacab08ca0333bdec5b8bdce8bbb:

raid5: fix a race of stripe count check (2014-04-17 17:05:28 +1000)

----------------------------------------------------------------
One BUG fix for md for recent commit

----------------------------------------------------------------
Shaohua Li (1):
raid5: fix a race of stripe count check

drivers/md/raid5.c | 3 +--
1 file changed, 1 insertion(+), 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;
}


Attachments:
signature.asc (828.00 B)