Skip to content

Commit

Permalink
md/raid10: remove unnecessary smp_mb() from end_sync_write
Browse files Browse the repository at this point in the history
Recent commit 4ca40c2 (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>
  • Loading branch information
NeilBrown committed Mar 13, 2012
1 parent 1e3fa9b commit 547414d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 547414d

Please sign in to comment.