summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-03-13 11:21:20 +1100
committerNeilBrown <neilb@suse.de>2012-03-13 11:21:20 +1100
commit547414d19fd72376ff2ecc42aac8d7a051f03d26 (patch)
treed46f4726e9bc397a182b9c36665a941e70692281 /drivers/md/raid10.c
parent1e3fa9bd5061778fb5cf4648e4e8321e8cbbb95b (diff)
md/raid10: remove unnecessary smp_mb() from end_sync_write
Recent commit 4ca40c2ce099e4f1ce3 (md/raid10: Allow replacement device ...) added an smp_mb in end_sync_write. This was to close a possible race with raid10_remove_disk. However there is no such race as it is never attempted to remove a disk while resync (or recovery) is happening. so the smp_mb is just noise. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 58c44d6453a0..1a19c962f860 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1682,10 +1682,8 @@ static void end_sync_write(struct bio *bio, int error)
d = find_bio_disk(conf, r10_bio, bio, &slot, &repl);
if (repl)
rdev = conf->mirrors[d].replacement;
- if (!rdev) {
- smp_mb();
+ else
rdev = conf->mirrors[d].rdev;
- }
if (!uptodate) {
if (repl)