diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-10 23:20:58 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-10 23:20:58 -0400 |
commit | 91502f099dfc5a1e8812898e26ee280713e1d002 (patch) | |
tree | 7e38d225da477345f674739ecf3aefec3c44307c | |
parent | 48c26ddc9f85808632a63b3ae50b868c86a2435f (diff) |
md/raid10: use correct limit variable
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>
-rw-r--r-- | drivers/md/raid10.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 146749b277c6..867d1b4e9634 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -3218,7 +3218,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, | |||
3218 | else { | 3218 | else { |
3219 | bad_sectors -= (sector - first_bad); | 3219 | bad_sectors -= (sector - first_bad); |
3220 | if (max_sync > bad_sectors) | 3220 | if (max_sync > bad_sectors) |
3221 | max_sync = max_sync; | 3221 | max_sync = bad_sectors; |
3222 | continue; | 3222 | continue; |
3223 | } | 3223 | } |
3224 | } | 3224 | } |