Skip to content

Commit

Permalink
md/raid10: use correct limit variable
Browse files Browse the repository at this point in the history
Clang complains that we are assigning a variable to itself.  This should
be using bad_sectors like the similar earlier check does.

Bug has been present since 3.1-rc1.  It is minor but could
conceivably cause corruption or other bad behaviour.

Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
Dan Carpenter authored and NeilBrown committed Oct 11, 2012
1 parent 48c26dd commit 91502f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -3218,7 +3218,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
else {
bad_sectors -= (sector - first_bad);
if (max_sync > bad_sectors)
max_sync = max_sync;
max_sync = bad_sectors;
continue;
}
}
Expand Down

0 comments on commit 91502f0

Please sign in to comment.