diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-11 14:20:58 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-21 09:27:59 -0700 |
commit | 9b38cc4a70f2c83857fd37707570a18c1027effe (patch) | |
tree | a9841de8c174c5c0e37522ceba2ce9ad59170396 /drivers/md | |
parent | a0fee8de3ae5784d4308b7bd18c303a4144ece18 (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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-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 1f7e8cd44e5c..4a038cdc0b54 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3019,7 +3019,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; } } |