aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-10-11 14:20:58 +1100
committerBen Hutchings <ben@decadent.org.uk>2012-10-30 23:26:43 +0000
commit69cc003f594c8697e623c78f800c4c7bcaf7c900 (patch)
treef63d91e03f88452d0696b5a8c3a0c8428f89b5fb /drivers
parentfe54b1e7efb9b0c4bc0be5202c50639cd7571c8e (diff)
md/raid10: use correct limit variable
commit 91502f099dfc5a1e8812898e26ee280713e1d002 upstream. 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. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/raid10.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 0634ee5bc3b..8f67c4d1bb6 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2641,7 +2641,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;
}
}