summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-20 13:25:30 +1000
committerChris Wright <chrisw@sous-sol.org>2006-11-03 17:33:47 -0800
commit8fb3dd17ba82cf264224fc19c69efb42e4370f28 (patch)
tree87ffc9f180d205a0b7039098c601048479f57e58 /drivers/md/raid10.c
parent563f2416b31884d196f194bcca580f8226b1dc4a (diff)
[PATCH] md: Fix calculation of ->degraded for multipath and raid10
Two less-used md personalities have bugs in the calculation of ->degraded (the extent to which the array is degraded). Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers/md/raid10.c')
-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 016ddb831c9b..115a6f866a87 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -2042,7 +2042,7 @@ static int run(mddev_t *mddev)
disk = conf->mirrors + i;
if (!disk->rdev ||
- !test_bit(In_sync, &rdev->flags)) {
+ !test_bit(In_sync, &disk->rdev->flags)) {
disk->head_position = 0;
mddev->degraded++;
}